Skip to content

Commit

Permalink
[skip ci] Attempt to modify unit test, still need to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Pragnya Pandrate committed Jul 7, 2022
1 parent 9030707 commit 4e49d93
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.IO;
using System.Linq;
using Microsoft.Build.Construction;
using Microsoft.Build.Definition;
using Microsoft.Build.Evaluation;
using Microsoft.Build.Locator;
Expand Down Expand Up @@ -116,8 +117,8 @@ public void AddPackageReferenceIntoProjectFileWhenItemGroupDoesNotExist_Success(
project.Save();

// Assert
Assert.Contains(@$"<PackageReference Include=""X"" />", File.ReadAllText(Path.Combine(testDirectory, "projectA.csproj")));
Assert.DoesNotContain(@$"<Version = ""1.0.0"" />", File.ReadAllText(Path.Combine(testDirectory, "projectA.csproj")));
ProjectItem packageReference = project.Xml.Items.LastOrDefault(i => i.ItemType == "PackageReference" && i.EvaluatedInclude.Equals("X"));
Assert.True(packageReference != null, packageReference.ItemType);
}

[Fact]
Expand Down

0 comments on commit 4e49d93

Please sign in to comment.