762657296790d028872cb4d08b67dc5398077962
[cdmlib.git] / cdmlib-model / src / test / java / eu / etaxonomy / cdm / model / common / TermTypeTest.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10 package eu.etaxonomy.cdm.model.common;
11
12 import static org.junit.Assert.*;
13
14 import org.junit.Test;
15
16 public class TermTypeTest {
17
18 @Test
19 public void test() {
20 TermType languageType = TermType.Language;
21 assertEquals(TermType.getByKey("LA"), languageType);
22 }
23
24 @Test
25 public void testKindOf(){
26 assertSame(TermType.Modifier, TermType.DeterminationModifier.getKindOf());
27 assertSame(TermType.Modifier, TermType.Scope.getKindOf());
28 assertSame(TermType.Scope, TermType.Sex.getKindOf());
29 assertSame(TermType.Scope, TermType.Stage.getKindOf());
30 }
31
32 @Test
33 public void testGeneralisationOf(){
34 assertTrue(TermType.Modifier.getGeneralizationOf().contains(TermType.DeterminationModifier));
35 assertTrue(TermType.Modifier.getGeneralizationOf().contains(TermType.Scope));
36 assertTrue(TermType.Scope.getGeneralizationOf().contains(TermType.Sex));
37 assertTrue(TermType.Scope.getGeneralizationOf().contains(TermType.Stage));
38 }
39
40
41
42 }