コード例 #1
0
 @Test
 public void ownerIsTheSoleMember() {
   Creature c = context.mock(Creature.class);
   PrivateMessageChannel ch = new PrivateMessageChannel(c);
   assertEquals(1, ch.getMembers().size());
   assertSame(c, ch.getMembers().iterator().next());
   assertTrue(ch.getMembers().contains(c));
 }
コード例 #2
0
 @Test
 public void hasOwner() {
   Creature c = context.mock(Creature.class);
   PrivateMessageChannel ch = new PrivateMessageChannel(c);
   assertSame(c, ch.getOwner());
 }