Project

General

Profile

« Previous | Next » 

Revision 64254a55

Added by Andreas Müller over 2 years ago

ref 6387 add some first rules for rank<->code test (cont.)

View differences:

cdmlib-model/src/test/java/eu/etaxonomy/cdm/validation/CorrectRanksForCodeTest.java
66 66
        constraintViolations  = validator.validate(name, Level2.class, Default.class);
67 67
        assertFalse("There should be a constraint violation as this name of rank cultivar has code ICNafp", constraintViolations.isEmpty());
68 68
        assertHasConstraintOnValidator((Set)constraintViolations, CorrectRanksForCodeValidator.class);
69

  
70
        name.setNameType(NomenclaturalCode.ICNCP);
71
        name.setRank(Rank.SPECIES());
72
        assertFalse("There should be a constraint violation as this name of rank cultivar has code ICNafp", constraintViolations.isEmpty());
73
        assertHasConstraintOnValidator((Set)constraintViolations, CorrectRanksForCodeValidator.class);
69 74
	}
70 75

  
71 76
	@Test

Also available in: Unified diff