예제 #1
0
파일: TC3.java 프로젝트: asilipo/softfood
  @Test
  public void testInserimentoIngredientePietanza() {
    User user_test = null;
    try {
      user_test = userFacade.login(Ruolo.CAMERIERE, "1234");
    } catch (RemoteException e) {
      fail("RemoteException");
    }

    ingredientePietanza = new IngredientePietanza();
    ingredientePietanza.setQuantita(5);
    ingredientePietanza.setIngrediente(ingrediente);
    ingredientePietanza.setArticolo(pietanza);

    try {
      ingredientePietanza =
          articoloFacade.inserisciIngredientePietanza(user_test, ingredientePietanza);
    } catch (AccessControlException e) {
      ingredientePietanza = null;
    } catch (RemoteException e) {
      fail("RemoteException");
    }

    try {
      userFacade.logout(user_test);
    } catch (RemoteException e) {
      fail("RemoteException");
    }

    assertNull(ingredientePietanza);
  }