예제 #1
0
 @Test
 public void findComposantProgrammeTest() {
   assertEquals("SEMESTRE 01", composantProgrammeDao.findComposantProgramme("SEM01").getNom());
   assertTrue(
       composantProgrammeDao
           .findComposantProgramme("SEM01")
           .getElementsPere()
           .contains(programmeDao.findProgramme("PROG01")));
 }
예제 #2
0
  @Test
  public void deleteComposantProgrammeTest() {
    programmeDao.findProgramme("PROG01").getElementsFils().remove(0);

    composantProgrammeDao.deleteComposantProgramme(
        composantProgrammeDao.findComposantProgramme("SEM01"));

    assertEquals(0, composantProgrammeDao.findAllComposantsProgramme().size());
  }
예제 #3
0
  @Test
  public void saveComposantProgrammeTest() {
    ComposantProgramme composantProgramme = new ComposantProgramme();

    composantProgramme.setCode("ANNEE01");
    composantProgramme.setNom("ANNEE 01");
    composantProgramme.setType(TypeComposantProgramme.ANNEE);
    composantProgramme.setPubliable(true);
    composantProgramme.setContenuValide(true);
    composantProgramme.setStructureValide(true);
    composantProgramme.setNbCredits(0);
    composantProgramme.setNbErreurs(0);
    composantProgramme.setPubliable(true);

    composantProgrammeDao.saveComposantProgramme(composantProgramme);
    assertEquals("ANNEE 01", composantProgrammeDao.findComposantProgramme("ANNEE01").getNom());
  }