예제 #1
0
파일: TC2.java 프로젝트: asilipo/softfood
  @Test
  public void testRimozioneIngrediente() {
    User user1 = null;
    try {
      user1 = userFacade.login(Ruolo.AMMINISTRATORE, "123456");
    } catch (RemoteException e1) {
      fail("RemoteException");
    }

    boolean ingredienteAttuale = false;
    try {
      ingredienteAttuale = articoloFacade.rimuoviIngrediente(user1, ingrediente.getId());
    } catch (AccessControlException e) {
      ingredienteAttuale = false;
    } catch (RemoteException e) {
      fail("RemoteException");
    }

    if (user1 != null) {
      try {
        userFacade.logout(user1);
      } catch (RemoteException e) {
        fail("RemoteException");
      }
    }

    Assert.assertFalse(ingredienteAttuale);
  }
예제 #2
0
파일: TC3.java 프로젝트: asilipo/softfood
 @After
 public void tearDown() throws Exception {
   articoloFacade.rimuoviIngrediente(user, ingrediente.getId());
   userFacade.logout(user);
 }