mirror of
https://github.com/actions/runner.git
synced 2025-12-13 00:36:29 +00:00
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:
committed by
Thomas Boop
parent
bcac4557a0
commit
ec9cb6c68d
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user