Respond to PR feedback in moving the UseVSTestRunner into the test DBPs file and removing the unnecessary $ in the command result assertion file
This commit is contained in:
parent
68acf81475
commit
cc62208676
3 changed files with 7 additions and 8 deletions
|
@ -31,8 +31,6 @@
|
||||||
This is a prevalent problem in building the precomputed assembly reference cache. Limiting the assemblies resolved
|
This is a prevalent problem in building the precomputed assembly reference cache. Limiting the assemblies resolved
|
||||||
to those outside the culture folders would work, but that is a nontrivial problem. -->
|
to those outside the culture folders would work, but that is a nontrivial problem. -->
|
||||||
<NoWarn>NU5125;NU5105;NU1701;MSB3243;MSB3247</NoWarn>
|
<NoWarn>NU5125;NU5105;NU1701;MSB3243;MSB3247</NoWarn>
|
||||||
|
|
||||||
<UseVSTestRunner>true</UseVSTestRunner>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(DisableSourceLink)' == 'true'">
|
<PropertyGroup Condition="'$(DisableSourceLink)' == 'true'">
|
||||||
|
|
|
@ -3,5 +3,6 @@
|
||||||
<Import Project="..\eng\TestVersions.props" />
|
<Import Project="..\eng\TestVersions.props" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
|
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
|
||||||
|
<UseVSTestRunner>true</UseVSTestRunner>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -28,21 +28,21 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
public AndConstraint<CommandResultAssertions> Pass()
|
public AndConstraint<CommandResultAssertions> Pass()
|
||||||
{
|
{
|
||||||
Execute.Assertion.ForCondition(_commandResult.ExitCode == 0)
|
Execute.Assertion.ForCondition(_commandResult.ExitCode == 0)
|
||||||
.FailWith(AppendDiagnosticsTo($"Expected command to pass but it did not."));
|
.FailWith(AppendDiagnosticsTo("Expected command to pass but it did not."));
|
||||||
return new AndConstraint<CommandResultAssertions>(this);
|
return new AndConstraint<CommandResultAssertions>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AndConstraint<CommandResultAssertions> Fail()
|
public AndConstraint<CommandResultAssertions> Fail()
|
||||||
{
|
{
|
||||||
Execute.Assertion.ForCondition(_commandResult.ExitCode != 0)
|
Execute.Assertion.ForCondition(_commandResult.ExitCode != 0)
|
||||||
.FailWith(AppendDiagnosticsTo($"Expected command to fail but it did not."));
|
.FailWith(AppendDiagnosticsTo("Expected command to fail but it did not."));
|
||||||
return new AndConstraint<CommandResultAssertions>(this);
|
return new AndConstraint<CommandResultAssertions>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AndConstraint<CommandResultAssertions> HaveStdOut()
|
public AndConstraint<CommandResultAssertions> HaveStdOut()
|
||||||
{
|
{
|
||||||
Execute.Assertion.ForCondition(!string.IsNullOrEmpty(_commandResult.StdOut))
|
Execute.Assertion.ForCondition(!string.IsNullOrEmpty(_commandResult.StdOut))
|
||||||
.FailWith(AppendDiagnosticsTo($"Command did not output anything to stdout"));
|
.FailWith(AppendDiagnosticsTo("Command did not output anything to stdout"));
|
||||||
return new AndConstraint<CommandResultAssertions>(this);
|
return new AndConstraint<CommandResultAssertions>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
public AndConstraint<CommandResultAssertions> HaveStdErr()
|
public AndConstraint<CommandResultAssertions> HaveStdErr()
|
||||||
{
|
{
|
||||||
Execute.Assertion.ForCondition(!string.IsNullOrEmpty(_commandResult.StdErr))
|
Execute.Assertion.ForCondition(!string.IsNullOrEmpty(_commandResult.StdErr))
|
||||||
.FailWith(AppendDiagnosticsTo($"Command did not output anything to stderr."));
|
.FailWith(AppendDiagnosticsTo("Command did not output anything to stderr."));
|
||||||
return new AndConstraint<CommandResultAssertions>(this);
|
return new AndConstraint<CommandResultAssertions>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,14 +125,14 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
public AndConstraint<CommandResultAssertions> NotHaveStdOut()
|
public AndConstraint<CommandResultAssertions> NotHaveStdOut()
|
||||||
{
|
{
|
||||||
Execute.Assertion.ForCondition(string.IsNullOrEmpty(_commandResult.StdOut))
|
Execute.Assertion.ForCondition(string.IsNullOrEmpty(_commandResult.StdOut))
|
||||||
.FailWith(AppendDiagnosticsTo($"Expected command to not output to stdout but it was not:"));
|
.FailWith(AppendDiagnosticsTo("Expected command to not output to stdout but it was not:"));
|
||||||
return new AndConstraint<CommandResultAssertions>(this);
|
return new AndConstraint<CommandResultAssertions>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AndConstraint<CommandResultAssertions> NotHaveStdErr()
|
public AndConstraint<CommandResultAssertions> NotHaveStdErr()
|
||||||
{
|
{
|
||||||
Execute.Assertion.ForCondition(string.IsNullOrEmpty(_commandResult.StdErr))
|
Execute.Assertion.ForCondition(string.IsNullOrEmpty(_commandResult.StdErr))
|
||||||
.FailWith(AppendDiagnosticsTo($"Expected command to not output to stderr but it was not:"));
|
.FailWith(AppendDiagnosticsTo("Expected command to not output to stderr but it was not:"));
|
||||||
return new AndConstraint<CommandResultAssertions>(this);
|
return new AndConstraint<CommandResultAssertions>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue