Revision 4dbcb616
Added by Andreas Müller over 3 years ago
cdmlib-model/src/test/java/eu/etaxonomy/cdm/validation/MustHaveAuthorityTest.java | ||
---|---|---|
23 | 23 |
import eu.etaxonomy.cdm.model.name.IBotanicalName; |
24 | 24 |
import eu.etaxonomy.cdm.model.name.Rank; |
25 | 25 |
import eu.etaxonomy.cdm.model.name.TaxonNameFactory; |
26 |
import eu.etaxonomy.cdm.model.term.DefaultTermInitializer; |
|
27 | 26 |
|
28 | 27 |
/** |
29 | 28 |
* NOTE: In this test, the words "valid" and "invalid", loaded though |
... | ... | |
32 | 31 |
* nomenclatural and taxonomic sense of these words. |
33 | 32 |
* |
34 | 33 |
* @author ben.clark |
35 |
* |
|
36 | 34 |
*/ |
37 | 35 |
public class MustHaveAuthorityTest extends ValidationTestBase { |
38 | 36 |
@SuppressWarnings("unused") |
... | ... | |
42 | 40 |
|
43 | 41 |
@Before |
44 | 42 |
public void setUp() { |
45 |
DefaultTermInitializer vocabularyStore = new DefaultTermInitializer(); |
|
46 |
vocabularyStore.initialize(); |
|
47 | 43 |
name = TaxonNameFactory.NewBotanicalInstance(Rank.SPECIES()); |
48 | 44 |
name.setNameCache("Aus aus"); |
49 | 45 |
name.setGenusOrUninomial("Aus"); |
... | ... | |
85 | 81 |
Set<ConstraintViolation<IBotanicalName>> constraintViolations = validator.validate(name, Level2.class); |
86 | 82 |
assertTrue("There should be no constraint violations as this name has the correct epithets for it rank", constraintViolations.isEmpty()); |
87 | 83 |
} |
88 |
} |
|
84 |
} |
Also available in: Unified diff
cleanup and use TermTestBase for model tests