/** Test edit anime */
 public void testEditAnime() {
   Index index = new Index("", 1);
   index.setCodeIndex(1);
   testIndexes.add(index);
   Anime anime = new Anime();
   anime.setCodeAnime(1);
   anime.setCurrentEpisode(0);
   testAnimes.add(anime);
   addAnimeController.setIndexAnime(index, anime);
   addAnimeController.okAction();
   assertTrue("The anime should be registered", testAnimes.size() > 0);
 } // end of the method testEditAnime
 /** Test add anime */
 public void testAddAnime() {
   Index index = new Index("", 1);
   index.setCodeIndex(1);
   Anime anime = new Anime();
   anime.setCodeAnime(1);
   anime.setCurrentEpisode(0);
   AddAnimeView addAnimeView = addAnimeController.getView();
   addAnimeView.setTitleAnime(index.getMainTitleAnime());
   addAnimeView.setCurrentEpisode(anime.getCurrentEpisode());
   addAnimeController.okAction();
   assertTrue("The anime should be registered", testAnimes.size() > 0);
 } // end of the method testAddAnime
Beispiel #3
0
 /**
  * Test registration of Index
  *
  * @throws java.sql.SQLException
  * @throws java.lang.ClassNotFoundException
  */
 @Test
 public void testAddIdex()
     throws SQLException, ClassNotFoundException, DataAlreadyRegisteredException {
   testIndex = indexDAO.addIndex(testIndex);
   assertTrue("Problem when registering Index!", testIndex.getCodeIndex() > 0);
   indexDAO.deleteIndex(testIndex);
 } // end of method testAddIdex
Beispiel #4
0
 /**
  * Test edit index with the index registered
  *
  * @throws SQLException
  */
 @Test
 public void testEditIndex()
     throws SQLException, DataAlreadyRegisteredException, UnavailableDataException {
   testIndex = indexDAO.addIndex(testIndex);
   testIndex.setCodeAnime(5);
   indexDAO.editIndex(testIndex);
   assertTrue("The edition was not effective!", indexDAO.getIndexes().get(0).getCodeAnime() == 5);
   indexDAO.deleteIndex(testIndex);
 } // end of the method testEditIndex