@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); }
@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(); }