Skip to content

Commit 3b9debf

Browse files
committed
Simplify
1 parent 656ea32 commit 3b9debf

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

test/Microsoft.NET.Build.Tests/ReferenceExeTests.cs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -503,21 +503,11 @@ public void ExeProjectCanReferenceTestProject(
503503
.Should()
504504
.Pass();
505505

506-
if (buildWithSelfContainedFromCommandLine)
507-
{
508-
new DotnetCommand(Log, "build", "--self-contained")
509-
.WithWorkingDirectory(consoleProjectDirectory)
510-
.Execute()
511-
.Should()
512-
.Pass();
513-
}
514-
else
515-
{
516-
new BuildCommand(Log, consoleProjectDirectory)
517-
.Execute()
518-
.Should()
519-
.Pass();
520-
}
506+
new BuildCommand(testAsset)
507+
.WithWorkingDirectory(consoleProjectDirectory)
508+
.Execute(buildWithSelfContainedFromCommandLine ? ["-p:SelfContained=true"] : Array.Empty<string>())
509+
.Should()
510+
.Pass();
521511
}
522512

523513
[Theory]

0 commit comments

Comments
 (0)