예제 #1
0
 @Test
 public void testAddObserver() {
   Timer timer = new SimpleTimer();
   MockSimpleTimer observer = new MockSimpleTimer();
   timer.addTimeObserver(observer);
   timer.timeChanged();
   assertEquals(1, observer.myTime);
 }
예제 #2
0
 @Test
 public void testInitialization() {
   Timer timer = new SimpleTimer();
   assertEquals(0, timer.getRound());
 }