Project

General

Profile

Download (1.64 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.term;
11

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

    
14
import org.apache.log4j.Logger;
15
import org.junit.Before;
16
import org.junit.Ignore;
17
import org.junit.Test;
18

    
19
import eu.etaxonomy.cdm.model.common.Language;
20
import eu.etaxonomy.cdm.model.term.DefaultTermInitializer;
21
import eu.etaxonomy.cdm.model.term.TermVocabulary;
22

    
23

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

    
32
	/**
33
	 * @throws java.lang.Exception
34
	 */
35
	@Before
36
	public void setUp() throws Exception {
37
	}
38

    
39

    
40
	/**
41
	 * Test method for {@link eu.etaxonomy.cdm.model.term.DefaultTermInitializer#initialize()}.
42
	 */
43
	@Test
44
	@Ignore // does not run yet in a test suite as the Language.DEFAULT() is not null then
45
	public void testInitialize() {
46
		assertNull("At the beginning of the initialization test the default language should still be null but is not", Language.DEFAULT());
47
		DefaultTermInitializer initalizer = new DefaultTermInitializer();
48
		initalizer.initialize();
49
		assertNotNull("Default language should be english but is null", Language.DEFAULT());
50
		TermVocabulary<Language> voc = Language.DEFAULT().getVocabulary();
51
		assertNotNull("language for language vocabulary representation was null but must be default language", voc.getRepresentation(Language.DEFAULT()));	
52
	}
53
}
(1-1/6)