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
|
package eu.etaxonomy.cdm.model.common;
|
10
|
|
11
|
import static org.junit.Assert.assertEquals;
|
12
|
|
13
|
import java.util.UUID;
|
14
|
|
15
|
import org.apache.log4j.Logger;
|
16
|
import org.junit.Test;
|
17
|
import org.springframework.util.Assert;
|
18
|
|
19
|
import eu.etaxonomy.cdm.test.unit.EntityTestBase;
|
20
|
|
21
|
/**
|
22
|
* @author a.mueller
|
23
|
* @since 08.06.2009
|
24
|
*/
|
25
|
public class ExtensionTypeTest extends EntityTestBase {
|
26
|
|
27
|
@SuppressWarnings("unused")
|
28
|
private static final Logger logger = Logger.getLogger(ExtensionTypeTest.class);
|
29
|
|
30
|
//****************** TESTS *******************************************************/
|
31
|
|
32
|
@Test
|
33
|
public void testRDF(){
|
34
|
UUID uuidRdf = UUID.fromString("f3684e25-dcad-4c1e-a5d8-16cddf1c4f5b");
|
35
|
ExtensionType rdfExtension = ExtensionType.getTermByUuid(uuidRdf);
|
36
|
Assert.notNull(rdfExtension, "RdfExtension must not be null");
|
37
|
assertEquals("Wrong label for extension type rdf", "RDF",rdfExtension.getRepresentation(Language.ENGLISH()).getAbbreviatedLabel());
|
38
|
}
|
39
|
|
40
|
@Test
|
41
|
public void testDOI(){
|
42
|
ExtensionType doiExtension = ExtensionType.DOI();
|
43
|
Assert.notNull(doiExtension, "DoiExtension must not be null");
|
44
|
assertEquals("Wrong label for extension type rdf", "DOI",doiExtension.getLabel());
|
45
|
}
|
46
|
}
|