Skip to content

Commit

Permalink
remove redundant uses of TestLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
adamralph committed Jan 23, 2021
1 parent 3131abd commit 8cfacdf
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion MinVerTests.Lib/AutoIncrement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static void RtmVersionIncrement(string tag, VersionPart autoIncrement, st
.x(() => Commit(path));

$"When the version is determined using auto-increment '{autoIncrement}'"
.x(() => actualVersion = Versioner.GetVersion(path, default, default, default, autoIncrement, default, new TestLogger()));
.x(() => actualVersion = Versioner.GetVersion(path, default, default, default, autoIncrement, default, default));

$"Then the version is '{expectedVersion}'"
.x(() => Assert.Equal(expectedVersion, actualVersion.ToString()));
Expand Down
8 changes: 4 additions & 4 deletions MinVerTests.Lib/BuildMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void NoCommits(string buildMetadata, string expectedVersion, strin
.x(() => EnsureEmptyRepository(path));

$"When the version is determined using build metadata '{buildMetadata}'"
.x(() => actualVersion = Versioner.GetVersion(path, default, default, buildMetadata, default, default, new TestLogger()));
.x(() => actualVersion = Versioner.GetVersion(path, default, default, buildMetadata, default, default, default));

$"Then the version is '{expectedVersion}'"
.x(() => Assert.Equal(expectedVersion, actualVersion.ToString()));
Expand All @@ -34,7 +34,7 @@ public static void NoTag(string buildMetadata, string expectedVersion, string pa
.x(() => EnsureEmptyRepositoryAndCommit(path));

$"When the version is determined using build metadata '{buildMetadata}'"
.x(() => actualVersion = Versioner.GetVersion(path, default, default, buildMetadata, default, default, new TestLogger()));
.x(() => actualVersion = Versioner.GetVersion(path, default, default, buildMetadata, default, default, default));

$"Then the version is '{expectedVersion}'"
.x(() => Assert.Equal(expectedVersion, actualVersion.ToString()));
Expand All @@ -56,7 +56,7 @@ public static void CurrentTag(string tag, string buildMetadata, string expectedV
.x(() => Tag(path, tag));

$"When the version is determined using build metadata '{buildMetadata}'"
.x(() => actualVersion = Versioner.GetVersion(path, default, default, buildMetadata, default, default, new TestLogger()));
.x(() => actualVersion = Versioner.GetVersion(path, default, default, buildMetadata, default, default, default));

$"Then the version is '{expectedVersion}'"
.x(() => Assert.Equal(expectedVersion, actualVersion.ToString()));
Expand All @@ -81,7 +81,7 @@ public static void PreviousTag(string tag, string buildMetadata, string expected
.x(() => Commit(path));

$"When the version is determined using build metadata '{buildMetadata}'"
.x(() => actualVersion = Versioner.GetVersion(path, default, default, buildMetadata, default, default, new TestLogger()));
.x(() => actualVersion = Versioner.GetVersion(path, default, default, buildMetadata, default, default, default));

$"Then the version is '{expectedVersion}'"
.x(() => Assert.Equal(expectedVersion, actualVersion.ToString()));
Expand Down
2 changes: 1 addition & 1 deletion MinVerTests.Lib/DefaultPreReleasePhases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static void DefaultPreReleasePhase(string phase, string expectedVersion,
.x(() => EnsureEmptyRepositoryAndCommit(path));

$"When the version is determined using the default pre-release phase '{phase}'"
.x(() => actualVersion = Versioner.GetVersion(path, default, default, default, default, phase, new TestLogger()));
.x(() => actualVersion = Versioner.GetVersion(path, default, default, default, default, phase, default));

$"Then the version is '{expectedVersion}'"
.x(() => Assert.Equal(expectedVersion, actualVersion.ToString()));
Expand Down
4 changes: 2 additions & 2 deletions MinVerTests.Lib/MinMajorMinor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static void NoCommits(string path, Version actualVersion)
.x(() => EnsureEmptyRepository(path));

"When the version is determined using minimum major minor '1.2'"
.x(() => actualVersion = Versioner.GetVersion(path, default, new MajorMinor(1, 2), default, default, default, new TestLogger()));
.x(() => actualVersion = Versioner.GetVersion(path, default, new MajorMinor(1, 2), default, default, default, default));

"Then the version is '1.2.0-alpha.0'"
.x(() => Assert.Equal("1.2.0-alpha.0", actualVersion.ToString()));
Expand Down Expand Up @@ -55,7 +55,7 @@ public static void NotTagged(string path, Version actualVersion)
.x(() => EnsureEmptyRepositoryAndCommit(path));

"When the version is determined using minimum major minor '1.0'"
.x(() => actualVersion = Versioner.GetVersion(path, default, new MajorMinor(1, 0), default, default, default, new TestLogger()));
.x(() => actualVersion = Versioner.GetVersion(path, default, new MajorMinor(1, 0), default, default, default, default));

"Then the version is '1.0.0-alpha.0'"
.x(() => Assert.Equal("1.0.0-alpha.0", actualVersion.ToString()));
Expand Down
2 changes: 1 addition & 1 deletion MinVerTests.Lib/TagPrefixes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static void TagPrefix(string tag, string prefix, string expectedVersion,
.x(() => Tag(path, tag));

$"When the version is determined using the tag prefix '{prefix}'"
.x(() => actualVersion = Versioner.GetVersion(path, prefix, default, default, default, default, new TestLogger()));
.x(() => actualVersion = Versioner.GetVersion(path, prefix, default, default, default, default, default));

$"Then the version is '{expectedVersion}'"
.x(() => Assert.Equal(expectedVersion, actualVersion.ToString()));
Expand Down
6 changes: 3 additions & 3 deletions MinVerTests.Lib/Versioning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static void RepoWithHistory(string name, string path)
{
Checkout(path, sha);
var version = Versioner.GetVersion(path, default, default, default, default, default, new TestLogger());
var version = Versioner.GetVersion(path, default, default, default, default, default, default);
var versionString = version.ToString();
var tagName = $"v/{versionString}";
Expand Down Expand Up @@ -120,7 +120,7 @@ public static void EmptyRepo(string path, Version version)
.x(() => EnsureEmptyRepository(path));

"When the version is determined"
.x(() => version = Versioner.GetVersion(path, default, default, default, default, default, new TestLogger()));
.x(() => version = Versioner.GetVersion(path, default, default, default, default, default, default));

"Then the version is 0.0.0-alpha.0"
.x(() => Assert.Equal("0.0.0-alpha.0", version.ToString()));
Expand All @@ -133,7 +133,7 @@ public static void NoRepo(string path, Version version)
.x(() => EnsureEmptyDirectory(path));

"When the version is determined"
.x(() => version = Versioner.GetVersion(path, default, default, default, default, default, new TestLogger()));
.x(() => version = Versioner.GetVersion(path, default, default, default, default, default, default));

"Then the version is 0.0.0-alpha.0"
.x(() => Assert.Equal("0.0.0-alpha.0", version.ToString()));
Expand Down

0 comments on commit 8cfacdf

Please sign in to comment.