Esempio n. 1
0
  @Test
  public void testCreeTiersSansDesignation() throws Exception {
    Tiers nouveauTiers = new Tiers();
    nouveauTiers.setDesignation(null);
    nouveauTiers.civilite = null;

    ValidationResult result = Validation.valid("tiers", nouveauTiers);
    assertFalse(result.ok);
  }
Esempio n. 2
0
  @Test
  public void testCreeTiersValide() throws Exception {
    Tiers nouveauTiers = new Tiers();
    nouveauTiers.setDesignation("Tiers1");
    nouveauTiers.civilite = null;

    ValidationResult result = Validation.valid("tiers", nouveauTiers);
    assertTrue(result.ok);

    nouveauTiers.save();
  }