Skip to content

Commit

Permalink
#2328 - indents + test
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Aug 2, 2023
1 parent 1342257 commit a603401
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,4 @@ public interface ObjectName {
* @return Hash.
*/
CommitHash hash();

/**
* Full name to string.
* @return Full name as string.
*/
String toString();
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ void takesHashFromGivenFullName() {
new OnDefault(
OnDefaultTest.OBJECT,
OnDefaultTest.FAKE
)
.hash()
.value(),
).hash().value(),
Matchers.equalTo(OnDefaultTest.HASH)
);
}
Expand Down Expand Up @@ -137,9 +135,7 @@ void takesHashFromGivenDefaultHash() {
new OnDefault(
OnDefaultTest.STDOUT,
OnDefaultTest.FAKE
)
.hash()
.value(),
).hash().value(),
Matchers.equalTo(OnDefaultTest.FAKE.value())
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ void behavesLikeSecond() {
);
}

@Test
void behavesLikeUnversioned() {
final String stdout = "stdout";
MatcherAssert.assertThat(
Expand All @@ -95,4 +96,19 @@ void behavesLikeUnversioned() {
Matchers.equalTo(stdout)
);
}

@Test
void behavesLikeDefault() {
MatcherAssert.assertThat(
String.format(
"Default swap object name should have been equal to %s, but it didn't",
OnSwapTest.FIRST
),
new OnSwap(
true,
new OnDefault(OnSwapTest.FIRST, OnSwapTest.FAKE)
).toString(),
Matchers.equalTo(OnSwapTest.FIRST)
);
}
}

0 comments on commit a603401

Please sign in to comment.