Remove trailing whitespace in JUnit assertion messages
This commit is contained in:
parent
4dcba05531
commit
e3883c0d69
|
@ -622,13 +622,13 @@ public class DurationFormatUtilsTest extends AbstractLangTest {
|
|||
final DurationFormatUtils.Token token = createTokenWithCount(DurationFormatUtils.y, 4);
|
||||
assertEquals(token, token);
|
||||
assertEquals(token.hashCode(), token.hashCode());
|
||||
assertNotEquals(token, new Object(), "Token equal to non-Token class. ");
|
||||
assertNotEquals(token, new Object(), "Token equal to non-Token class.");
|
||||
final Token token2 = createTokenWithCount("", 1);
|
||||
assertNotEquals(token, token2, "Token equal to Token with wrong value class. ");
|
||||
assertNotEquals(token, token2, "Token equal to Token with wrong value class.");
|
||||
assertNotEquals(token.hashCode(), token2.hashCode());
|
||||
assertNotEquals(token, createTokenWithCount(DurationFormatUtils.y, 1), "Token equal to Token with different count. ");
|
||||
assertNotEquals(token, createTokenWithCount(DurationFormatUtils.y, 1), "Token equal to Token with different count.");
|
||||
final DurationFormatUtils.Token numToken = createTokenWithCount("1", 4);
|
||||
assertEquals(numToken, numToken, "Token with Number value not equal to itself. ");
|
||||
assertEquals(numToken, numToken, "Token with Number value not equal to itself.");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -98,31 +98,19 @@ public class StopWatchTest extends AbstractLangTest {
|
|||
@Test
|
||||
public void testBadStates() {
|
||||
final StopWatch watch = new StopWatch();
|
||||
assertThrows(IllegalStateException.class, watch::stop, "Calling stop on an unstarted StopWatch should throw an exception. ");
|
||||
|
||||
assertThrows(IllegalStateException.class, watch::suspend, "Calling suspend on an unstarted StopWatch should throw an exception. ");
|
||||
|
||||
assertThrows(IllegalStateException.class, watch::split, "Calling split on a non-running StopWatch should throw an exception. ");
|
||||
|
||||
assertThrows(IllegalStateException.class, watch::unsplit, "Calling unsplit on an unsplit StopWatch should throw an exception. ");
|
||||
|
||||
assertThrows(IllegalStateException.class, watch::resume, "Calling resume on an unsuspended StopWatch should throw an exception. ");
|
||||
|
||||
assertThrows(IllegalStateException.class, watch::stop, "Calling stop on an unstarted StopWatch should throw an exception.");
|
||||
assertThrows(IllegalStateException.class, watch::suspend, "Calling suspend on an unstarted StopWatch should throw an exception.");
|
||||
assertThrows(IllegalStateException.class, watch::split, "Calling split on a non-running StopWatch should throw an exception.");
|
||||
assertThrows(IllegalStateException.class, watch::unsplit, "Calling unsplit on an unsplit StopWatch should throw an exception.");
|
||||
assertThrows(IllegalStateException.class, watch::resume, "Calling resume on an unsuspended StopWatch should throw an exception.");
|
||||
watch.start();
|
||||
|
||||
assertThrows(IllegalStateException.class, watch::start, "Calling start on a started StopWatch should throw an exception. ");
|
||||
|
||||
assertThrows(IllegalStateException.class, watch::unsplit, "Calling unsplit on an unsplit StopWatch should throw an exception. ");
|
||||
|
||||
assertThrows(IllegalStateException.class, watch::getSplitTime, "Calling getSplitTime on an unsplit StopWatch should throw an exception. ");
|
||||
|
||||
assertThrows(IllegalStateException.class, watch::getSplitDuration, "Calling getSplitTime on an unsplit StopWatch should throw an exception. ");
|
||||
|
||||
assertThrows(IllegalStateException.class, watch::resume, "Calling resume on an unsuspended StopWatch should throw an exception. ");
|
||||
|
||||
assertThrows(IllegalStateException.class, watch::start, "Calling start on a started StopWatch should throw an exception.");
|
||||
assertThrows(IllegalStateException.class, watch::unsplit, "Calling unsplit on an unsplit StopWatch should throw an exception.");
|
||||
assertThrows(IllegalStateException.class, watch::getSplitTime, "Calling getSplitTime on an unsplit StopWatch should throw an exception.");
|
||||
assertThrows(IllegalStateException.class, watch::getSplitDuration, "Calling getSplitTime on an unsplit StopWatch should throw an exception.");
|
||||
assertThrows(IllegalStateException.class, watch::resume, "Calling resume on an unsuspended StopWatch should throw an exception.");
|
||||
watch.stop();
|
||||
|
||||
assertThrows(IllegalStateException.class, watch::start, "Calling start on a stopped StopWatch should throw an exception as it needs to be reset. ");
|
||||
assertThrows(IllegalStateException.class, watch::start, "Calling start on a stopped StopWatch should throw an exception as it needs to be reset.");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue