mirror of
https://github.com/actions/runner.git
synced 2025-12-14 13:43:33 +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
@@ -36,10 +36,10 @@ namespace GitHub.Runner.Common.Tests.Worker.Container
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(result0);
|
||||
Assert.Equal(result0.Count, 0);
|
||||
Assert.Equal(0, result0.Count);
|
||||
|
||||
Assert.NotNull(result1);
|
||||
Assert.Equal(result1.Count, 1);
|
||||
Assert.Equal(1, result1.Count);
|
||||
var result1Port80Mapping = result1.Find(pm =>
|
||||
string.Equals(pm.ContainerPort, "80") &&
|
||||
string.Equals(pm.HostPort, "32881") &&
|
||||
@@ -48,10 +48,10 @@ namespace GitHub.Runner.Common.Tests.Worker.Container
|
||||
Assert.NotNull(result1Port80Mapping);
|
||||
|
||||
Assert.NotNull(result1Empty);
|
||||
Assert.Equal(result1Empty.Count, 0);
|
||||
Assert.Equal(0, result1Empty.Count);
|
||||
|
||||
Assert.NotNull(result2);
|
||||
Assert.Equal(result2.Count, 2);
|
||||
Assert.Equal(2, result2.Count);
|
||||
var result2Port80Mapping = result2.Find(pm =>
|
||||
string.Equals(pm.ContainerPort, "80") &&
|
||||
string.Equals(pm.HostPort, "32881") &&
|
||||
|
||||
Reference in New Issue
Block a user