Fix build warnings in Test project (#178)

The build warnings were of these type (mostly reported by xUnit's Code Analyzers):
- Fixed wrong parameter order in xUnit assertions (can lead to poor error reporting in test failures)
- Unused code was removed
- Correct assertions were used (e.g. Assert.True/.Contains/.EndsWith)
- Public non-test methods on test classes were made private
This commit is contained in:
Eilon Lipton
2019-11-06 05:52:51 -08:00
committed by Thomas Boop
parent bcac4557a0
commit ec9cb6c68d
10 changed files with 139 additions and 162 deletions

View File

@@ -107,7 +107,7 @@ namespace GitHub.Runner.Common.Tests
}
}
public void Setup([CallerMemberName] string testName = "")
private void Setup([CallerMemberName] string testName = "")
{
_tokenSource = new CancellationTokenSource();
_hc = new HostContext(
@@ -115,7 +115,7 @@ namespace GitHub.Runner.Common.Tests
logFile: Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), $"trace_{nameof(HostContextL0)}_{testName}.log"));
}
public void Teardown()
private void Teardown()
{
_hc?.Dispose();
_tokenSource?.Dispose();