コード例 #1
0
 /** Tests for fire. */
 @Test
 public final void testFire() {
   assertFalse(
       new LevelLessThanCondition(99)
           .fire(level100Player, ConversationParser.parse("lessthan"), null));
   assertFalse(
       new LevelLessThanCondition(100)
           .fire(level100Player, ConversationParser.parse("lessthan"), null));
   assertTrue(
       new LevelLessThanCondition(101)
           .fire(level100Player, ConversationParser.parse("lessthan"), null));
 }
コード例 #2
0
 /** Tests for fire. */
 @Test
 public void testFire() {
   assertTrue(
       new AdminCondition(0)
           .fire(
               createPlayer("player"),
               ConversationParser.parse("testAdminConditionText"),
               SpeakerNPCTestHelper.createSpeakerNPC()));
   assertFalse(
       new AdminCondition()
           .fire(
               createPlayer("player"),
               ConversationParser.parse("testAdminConditionText"),
               SpeakerNPCTestHelper.createSpeakerNPC()));
 }
コード例 #3
0
 /** Tests for fireThrowsNullPointerException. */
 @Test(expected = NullPointerException.class)
 public void testFireThrowsNullPointerException() {
   new AdminCondition(100)
       .fire(
           null,
           ConversationParser.parse("testAdminConditionText"),
           SpeakerNPCTestHelper.createSpeakerNPC());
 }