Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
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. -->
<NoWarn>NU5125;NU5105;NU1701;MSB3243;MSB3247</NoWarn>

<UseVSTestRunner>true</UseVSTestRunner>
Comment thread
marcpopMSFT marked this conversation as resolved.
Outdated
</PropertyGroup>

<PropertyGroup Condition="'$(DisableSourceLink)' == 'true'">
Expand Down
4 changes: 2 additions & 2 deletions eng/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ jobs:
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testRunner: XUnit
testResultsFiles: 'artifacts/TestResults/${{ parameters.buildConfiguration }}/*.xml'
testRunner: VSTest
testResultsFiles: 'artifacts/TestResults/${{ parameters.buildConfiguration }}/*.trx'
testRunTitle: '$(_AgentOSName)_$(Agent.JobName)'
platform: '$(BuildPlatform)'
configuration: '${{ parameters.buildConfiguration }}'
Expand Down
4 changes: 2 additions & 2 deletions eng/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ jobs:
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testRunner: XUnit
testResultsFiles: 'artifacts/TestResults/${{ parameters.buildConfiguration }}/*.xml'
testRunner: VSTest
testResultsFiles: 'artifacts/TestResults/${{ parameters.buildConfiguration }}/*.trx'
testRunTitle: '$(_AgentOSName)_$(Agent.JobName)'
platform: '$(BuildPlatform)'
configuration: '${{ parameters.buildConfiguration }}'
Expand Down
2 changes: 1 addition & 1 deletion test/EndToEnd/ValidateInsertedManifests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void ManifestReaderCanReadManifests()
File.Exists(manifestFile).Should().BeTrue();
using var fileStream = new FileStream(manifestFile, FileMode.Open, FileAccess.Read);
Action readManifest = () => WorkloadManifestReader.ReadWorkloadManifest(manifestId, fileStream, manifestFile);
readManifest.ShouldNotThrow("manifestId:" + manifestId + " manifestFile:" + manifestFile + "is invalid");
readManifest.Should().NotThrow("manifestId:" + manifestId + " manifestFile:" + manifestFile + "is invalid");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public AndConstraint<CommandResultAssertions> Fail()
public AndConstraint<CommandResultAssertions> HaveStdOut()
{
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"));
Comment thread
marcpopMSFT marked this conversation as resolved.
Outdated
return new AndConstraint<CommandResultAssertions>(this);
}

Expand Down Expand Up @@ -97,7 +97,7 @@ public AndConstraint<CommandResultAssertions> HaveStdOutMatching(string pattern,
public AndConstraint<CommandResultAssertions> HaveStdErr()
{
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);
}

Expand Down Expand Up @@ -132,7 +132,7 @@ public AndConstraint<CommandResultAssertions> NotHaveStdOut()
public AndConstraint<CommandResultAssertions> NotHaveStdErr()
{
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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public DirectoryInfoAssertions(DirectoryInfo dir)
public AndConstraint<DirectoryInfoAssertions> Exist()
{
Execute.Assertion.ForCondition(_dirInfo.Exists)
.FailWith("Expected directory {0} does not exist.", _dirInfo.FullName);
.FailWith(String.Format("Expected directory {0} does not exist.", _dirInfo.FullName));
return new AndConstraint<DirectoryInfoAssertions>(this);
}

Expand Down Expand Up @@ -71,7 +71,7 @@ public AndConstraint<DirectoryInfoAssertions> NotHaveFile(
Execute.Assertion
.ForCondition(file == null)
.BecauseOf(because, reasonArgs)
.FailWith("File {0} should not be found in directory {1}.", expectedFile, _dirInfo.FullName);
.FailWith(String.Format("File {0} should not be found in directory {1}.", expectedFile, _dirInfo.FullName));
return new AndConstraint<DirectoryInfoAssertions>(this);
}

Expand Down Expand Up @@ -109,8 +109,8 @@ public AndConstraint<DirectoryInfoAssertions> HaveFilesMatching(
Execute.Assertion
.ForCondition(matchingFileExists == true)
.BecauseOf(because, reasonArgs)
.FailWith("Expected directory {0} to contain files matching {1}, but no matching file exists.",
_dirInfo.FullName, expectedFilesSearchPattern);
.FailWith(String.Format("Expected directory {0} to contain files matching {1}, but no matching file exists.",
_dirInfo.FullName, expectedFilesSearchPattern));

return new AndConstraint<DirectoryInfoAssertions>(this);
}
Expand All @@ -132,16 +132,16 @@ public AndConstraint<DirectoryInfoAssertions> NotHaveFilesMatching(string expect
{
var matchingFileCount = _dirInfo.EnumerateFiles(expectedFilesSearchPattern, searchOption).Count();
Execute.Assertion.ForCondition(matchingFileCount == 0)
.FailWith("Found {0} files that should not exist in directory {1}. No file matching {2} should exist.",
matchingFileCount, _dirInfo.FullName, expectedFilesSearchPattern);
.FailWith(String.Format("Found {0} files that should not exist in directory {1}. No file matching {2} should exist.",
matchingFileCount, _dirInfo.FullName, expectedFilesSearchPattern));
return new AndConstraint<DirectoryInfoAssertions>(this);
}

public AndConstraint<DirectoryInfoAssertions> HaveDirectory(string expectedDir)
{
var dir = _dirInfo.EnumerateDirectories(expectedDir, SearchOption.TopDirectoryOnly).SingleOrDefault();
Execute.Assertion.ForCondition(dir != null)
.FailWith("Expected directory {0} cannot be found inside directory {1}.", expectedDir, _dirInfo.FullName);
.FailWith(String.Format("Expected directory {0} cannot be found inside directory {1}.", expectedDir, _dirInfo.FullName));

return new AndConstraint<DirectoryInfoAssertions>(new DirectoryInfoAssertions(dir));
}
Expand All @@ -160,7 +160,7 @@ public AndConstraint<DirectoryInfoAssertions> NotHaveDirectory(string unexpected
{
var dir = _dirInfo.EnumerateDirectories(unexpectedDir, SearchOption.TopDirectoryOnly).SingleOrDefault();
Execute.Assertion.ForCondition(dir == null)
.FailWith("Directory {0} should not be found in directory {1}.", unexpectedDir, _dirInfo.FullName);
.FailWith(String.Format("Directory {0} should not be found in directory {1}.", unexpectedDir, _dirInfo.FullName));

return new AndConstraint<DirectoryInfoAssertions>(new DirectoryInfoAssertions(dir));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="4.18.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="Microsoft.DotNet.Cli.Utils" Version="$(MicrosoftDotNetCliUtilsPackageVersion)" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
Expand Down
2 changes: 1 addition & 1 deletion test/core-sdk-tasks.Tests/core-sdk-tasks.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="4.18.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
</ItemGroup>

<ItemGroup>
Expand Down