Exemplo n.º 1
0
 @Test
 public void shouldImplementComparable() {
   ActorRef ref1 = system.actorOf(TrivialActor.class);
   ActorRef ref2 = system.actorOf(TrivialActor.class);
   Assert.assertNotEquals(
       "Two references must appear as different using the compareTo method",
       0,
       ref1.compareTo(ref2));
   Assert.assertEquals(
       "A reference must be equal to itself according to compareTo method",
       0,
       ref1.compareTo(ref1));
 }
Exemplo n.º 2
0
 @Override
 public int compareTo(ActorRef o) {
   return reference.compareTo(o);
 }