Ejemplo n.º 1
0
 /** Test remove object */
 @Test
 public void removeObserver() {
   addAnimeController.addObserver(observerTest);
   addAnimeController.deleteObserver(observerTest);
   addAnimeController.notifyObservers();
   assertFalse("Observer not removed!", observerTest.notified);
 } // end of the method removeObserver
Ejemplo n.º 2
0
 /** Test add and notify methods */
 @Test
 public void testAddNotifyObserver() {
   addAnimeController.addObserver(observerTest);
   addAnimeController.notifyObservers();
   assertTrue("Observer not added!", observerTest.notified);
 } // end of the method testAddNotifyObserver