Skip to content

Commit

Permalink
chore: don't replace existing test
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Oct 18, 2024
1 parent c2d7b37 commit 0f0a4a2
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3147,6 +3147,47 @@ public async Task UnresolvablePropertyDoesNotStopOtherUpdates(bool useDependency
{
using var _ = new DependencySolverEnvironment(useDependencySolver);

// the property `$(SomeUnresolvableProperty)` cannot be resolved
await TestUpdateForProject("Some.Package", "7.0.1", "13.0.1",
packages:
[
MockNuGetPackage.CreateSimplePackage("Some.Package", "7.0.1", "net8.0"),
MockNuGetPackage.CreateSimplePackage("Some.Package", "13.0.1", "net8.0"),
MockNuGetPackage.CreateSimplePackage("Some.Other.Package", "1.0.0", "net8.0"),
],
projectContents: """
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Some.Other.Package" Version="$(SomeUnresolvableProperty)" />
<PackageReference Include="Some.Package" Version="7.0.1" />
</ItemGroup>
</Project>
""",
expectedProjectContents: """
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Some.Other.Package" Version="$(SomeUnresolvableProperty)" />
<PackageReference Include="Some.Package" Version="13.0.1" />
</ItemGroup>
</Project>
"""
);
}


[Theory]
[InlineData(true)]
[InlineData(false)]
public async Task ProjectWithWorkloadsShouldNotFail(bool useDependencySolver)
{
using var _ = new DependencySolverEnvironment(useDependencySolver);

// the property `$(SomeUnresolvableProperty)` cannot be resolved
await TestUpdateForProject("Some.Package", "7.0.1", "13.0.1",
packages:
Expand Down

0 comments on commit 0f0a4a2

Please sign in to comment.