Package net.alteiar.beans.dice

Examples of net.alteiar.beans.dice.DiceRoller.removePropertyChangeListener()


    roller.roll(new DiceSingle(6));

    while (listener.getCallCount() < 1) {
      sleep(5);
    }
    roller.removePropertyChangeListener(listener);
    assertEquals("Must have 1 call to listener", 1, listener.getCallCount());
  }

  @Test(timeout = 1000)
  public void testDiceBag() {
View Full Code Here


    roller.roll(bag);

    while (listener.getCallCount() < 1) {
      sleep(5);
    }
    roller.removePropertyChangeListener(listener);
    assertEquals("Must have 1 call to listener", 1, listener.getCallCount());
  }

  @Test(timeout = 1000)
  public void testMultipleRoll() {
View Full Code Here

    roller.roll(new DiceSingle(6));

    while (listener.getCallCount() < 3) {
      sleep(5);
    }
    roller.removePropertyChangeListener(listener);
    assertEquals("Must have 3 call to listener", 3, listener.getCallCount());
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.