Project

General

Profile

Download (1.98 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
4
* http://www.e-taxonomy.eu
5
* 
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

    
10
package eu.etaxonomy.cdm.model.common;
11

    
12
import static org.junit.Assert.*;
13

    
14
import org.apache.log4j.Logger;
15
import org.junit.After;
16
import org.junit.AfterClass;
17
import org.junit.Before;
18
import org.junit.BeforeClass;
19
import org.junit.Ignore;
20
import org.junit.Test;
21

    
22
/**
23
 * @author a.mueller
24
 * @created 02.03.2009
25
 * @version 1.0
26
 */
27
public class DefaultTermInitializerTest {
28
	@SuppressWarnings("unused")
29
	private static final Logger logger = Logger.getLogger(DefaultTermInitializerTest.class);
30

    
31
	/**
32
	 * @throws java.lang.Exception
33
	 */
34
	@BeforeClass
35
	public static void setUpBeforeClass() throws Exception {
36
	}
37

    
38
	/**
39
	 * @throws java.lang.Exception
40
	 */
41
	@AfterClass
42
	public static void tearDownAfterClass() throws Exception {
43
	}
44

    
45
	/**
46
	 * @throws java.lang.Exception
47
	 */
48
	@Before
49
	public void setUp() throws Exception {
50
	}
51

    
52
	/**
53
	 * @throws java.lang.Exception
54
	 */
55
	@After
56
	public void tearDown() throws Exception {
57
	}
58

    
59
	/**
60
	 * Test method for {@link eu.etaxonomy.cdm.model.common.DefaultTermInitializer#initialize()}.
61
	 */
62
	@Test
63
	@Ignore // does not run yet in a test suite as the Language.DEFAULT() is not null then
64
	public void testInitialize() {
65
		assertNull("At the beginning of the initialization test the default language should still be null but is not", Language.DEFAULT());
66
		DefaultTermInitializer initalizer = new DefaultTermInitializer();
67
		initalizer.initialize();
68
		assertNotNull("Default language should be english but is null", Language.DEFAULT());
69
		TermVocabulary<Language> voc = Language.DEFAULT().getVocabulary();
70
		assertNotNull("language for language vocabulary representation was null but must be default language", voc.getRepresentation(Language.DEFAULT()));	
71
	}
72
}
(3-3/12)