Skip to content

Commit 6deee76

Browse files
committed
fix a few more expectations
1 parent e7c60f3 commit 6deee76

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

test/dotnet-watch.Tests/CommandLineOptionsTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ public void ShortFormForLaunchProfileArgumentWorks()
424424
[InlineData(new[] { "--framework", "net9.0" }, new[] { "-property:TargetFramework=net9.0", NugetInteractiveProperty })]
425425
[InlineData(new[] { "--runtime", "arm64" }, new[] { "-property:RuntimeIdentifier=arm64", "-property:_CommandLineDefinedRuntimeIdentifier=true", NugetInteractiveProperty })]
426426
[InlineData(new[] { "--property", "b=1" }, new[] { "--property:b=1", NugetInteractiveProperty })]
427-
[InlineData(new[] { "--interactive" }, new[] { NugetInteractiveProperty })]
427+
[InlineData(new[] { "--interactive" }, new[] { "-property:NuGetInteractive=true" })]
428428
[InlineData(new[] { "--no-restore" }, new[] { NugetInteractiveProperty, "-restore:false" })]
429429
[InlineData(new[] { "--sc" }, new[] { NugetInteractiveProperty, "-property:SelfContained=True", "-property:_CommandLineDefinedSelfContained=true" })]
430430
[InlineData(new[] { "--self-contained" }, new[] { NugetInteractiveProperty, "-property:SelfContained=True", "-property:_CommandLineDefinedSelfContained=true" })]

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetPublishInvocation.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public GivenDotnetPublishInvocation(ITestOutputHelper output)
1919

2020
private static readonly string[] ExpectedPrefix = ["-maxcpucount", "-verbosity:m", "-tlp:default=auto", "-nologo"];
2121
private static readonly string[] ExpectedProperties = ["--property:_IsPublishing=true"];
22+
private static readonly string NuGetDisabledProperty = "-property:NuGetInteractive=false";
2223

2324
[Theory]
2425
[InlineData(new string[] { }, new string[] { })]
@@ -56,7 +57,7 @@ public void MsbuildInvocationIsCorrect(string[] args, string[] expectedAdditiona
5657

5758
command.GetArgumentTokensToMSBuild()
5859
.Should()
59-
.BeEquivalentTo([.. ExpectedPrefix, "-restore", "-target:Publish", .. ExpectedProperties, .. expectedAdditionalArgs]);
60+
.BeEquivalentTo([.. ExpectedPrefix, "-restore", "-target:Publish", .. ExpectedProperties, .. expectedAdditionalArgs, NuGetDisabledProperty]);
6061
});
6162
}
6263

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetRestoreInvocation.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
99
public class GivenDotnetRestoreInvocation : IClassFixture<NullCurrentSessionIdFixture>
1010
{
1111
private static readonly string[] ExpectedPrefix = ["-maxcpucount", "-verbosity:m", "-tlp:default=auto", "-nologo", "-target:Restore"];
12+
private static readonly string NuGetDisabledProperty = "-property:NuGetInteractive=false";
1213
private static readonly string WorkingDirectory =
1314
TestPathUtilities.FormatAbsolutePath(nameof(GivenDotnetRestoreInvocation));
1415

@@ -49,7 +50,7 @@ public void MsbuildInvocationIsCorrect(string[] args, string[] expectedAdditiona
4950
RestoreCommand.FromArgs(args, msbuildPath)
5051
.GetArgumentTokensToMSBuild()
5152
.Should()
52-
.BeEquivalentTo([.. ExpectedPrefix, .. expectedAdditionalArgs]);
53+
.BeEquivalentTo([.. ExpectedPrefix, .. expectedAdditionalArgs, NuGetDisabledProperty]);
5354
});
5455
}
5556
}

test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetRunInvocation.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
99
public class GivenDotnetRunInvocation : IClassFixture<NullCurrentSessionIdFixture>
1010
{
1111
private static readonly string[] ConstantRestoreArgs = ["-nologo", "-verbosity:quiet"];
12+
private static readonly string NuGetDisabledProperty = "-property:NuGetInteractive=false";
1213

1314
public ITestOutputHelper Log { get; }
1415

@@ -41,7 +42,7 @@ public void MsbuildInvocationIsCorrect(string[] args, string[] expectedArgs)
4142
var command = RunCommand.FromArgs(args);
4243
command.RestoreArgs
4344
.Should()
44-
.BeEquivalentTo([.. ConstantRestoreArgs, .. expectedArgs]);
45+
.BeEquivalentTo([.. ConstantRestoreArgs, .. expectedArgs, NuGetDisabledProperty]);
4546
});
4647
}
4748
finally

0 commit comments

Comments
 (0)