Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonlouie committed Nov 18, 2023
1 parent 08efaec commit ff01ef0
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 349 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public void CheckApiAnalysisResult()
Assert.AreEqual("Microsoft.VisualStudio.Web.BrowserLink", apiAnalysisResult.CodeEntityDetails.Package.PackageId);
Assert.AreEqual("2.2.0", apiAnalysisResult.CodeEntityDetails.Package.Version);
Assert.AreEqual(PackageSourceType.NUGET, apiAnalysisResult.CodeEntityDetails.Package.PackageSourceType);
Assert.AreEqual(Compatibility.COMPATIBLE, apiAnalysisResult.CompatibilityResults.GetValueOrDefault("netcoreapp3.1").Compatibility);
Assert.AreEqual(Compatibility.INCOMPATIBLE, apiAnalysisResult.CompatibilityResults.GetValueOrDefault("netcoreapp3.1").Compatibility);
Assert.AreEqual(0, apiAnalysisResult.CompatibilityResults.GetValueOrDefault("netcoreapp3.1").CompatibleVersions.Count);
Assert.AreEqual(RecommendedActionType.NoRecommendation, apiAnalysisResult.Recommendations.RecommendedActions.First().RecommendedActionType);
Assert.Null(apiAnalysisResult.Recommendations.RecommendedActions.First().Description);
Expand Down Expand Up @@ -228,10 +228,10 @@ public void CheckApiAnalysisResult()
Assert.AreEqual("WebMarkupMin.AspNetCore2", apiAnalysisResult.CodeEntityDetails.Package.PackageId);
Assert.AreEqual("2.7.0", apiAnalysisResult.CodeEntityDetails.Package.Version);
Assert.AreEqual(PackageSourceType.NUGET, apiAnalysisResult.CodeEntityDetails.Package.PackageSourceType);
Assert.AreEqual(Compatibility.COMPATIBLE, apiAnalysisResult.CompatibilityResults.GetValueOrDefault("netcoreapp3.1").Compatibility);
Assert.True(apiAnalysisResult.CompatibilityResults.GetValueOrDefault("netcoreapp3.1").CompatibleVersions.Count > 0);
Assert.AreEqual(RecommendedActionType.UpgradePackage, apiAnalysisResult.Recommendations.RecommendedActions.First().RecommendedActionType);
Assert.AreEqual("2.10.0", apiAnalysisResult.Recommendations.RecommendedActions.First().Description);
Assert.AreEqual(Compatibility.INCOMPATIBLE, apiAnalysisResult.CompatibilityResults.GetValueOrDefault("netcoreapp3.1").Compatibility);
Assert.True(apiAnalysisResult.CompatibilityResults.GetValueOrDefault("netcoreapp3.1").CompatibleVersions.Count == 0);
Assert.AreEqual(RecommendedActionType.NoRecommendation, apiAnalysisResult.Recommendations.RecommendedActions.First().RecommendedActionType);
Assert.AreEqual(null, apiAnalysisResult.Recommendations.RecommendedActions.First().Description);


var blogController = sourceFileAnalysisResults.Find(s => s.SourceFileName == "BlogController.cs");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public void CheckPackageAnalysisResult()
Version = "2.0.1",
PackageSourceType = PackageSourceType.NUGET
}).Result;
Assert.AreEqual(Compatibility.COMPATIBLE,
Assert.AreEqual(Compatibility.INCOMPATIBLE,
packageAnalysisResult.CompatibilityResults.GetValueOrDefault("netcoreapp3.1").Compatibility);
Assert.AreEqual(0, packageAnalysisResult.CompatibilityResults.GetValueOrDefault("netcoreapp3.1").CompatibleVersions.Count);
Assert.AreEqual(RecommendedActionType.UpgradePackage, packageAnalysisResult.Recommendations.RecommendedActions.First().RecommendedActionType);
Expand Down
Loading

0 comments on commit ff01ef0

Please sign in to comment.