Ejemplo n.º 1
0
 @Test
 public void testShouldReturnNegativeWhenFirstLessThanSecond() throws Exception {
   Message<Long> one = buildMessage(98);
   Message<Long> two = buildMessage(99);
   assertTrue(one.compareTo(two) < 0);
 }
Ejemplo n.º 2
0
 @Test
 public void testShouldReturnZeroWhenFirstEqualsSecond() throws Exception {
   Message<Long> one = buildMessage(90);
   Message<Long> two = buildMessage(90);
   assertEquals(0, one.compareTo(two));
 }
Ejemplo n.º 3
0
 @Test
 public void testShouldReturnPositiveWhenFirstGreaterThanSecond() throws Exception {
   Message<Long> one = buildMessage(100);
   Message<Long> two = buildMessage(99);
   assertTrue(one.compareTo(two) > 0);
 }