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.common;
|
11
|
|
12
|
import static org.junit.Assert.assertNotNull;
|
13
|
|
14
|
import java.io.File;
|
15
|
import java.io.IOException;
|
16
|
import java.io.InputStream;
|
17
|
|
18
|
import org.junit.Assert;
|
19
|
import org.junit.Ignore;
|
20
|
import org.junit.Test;
|
21
|
|
22
|
|
23
|
public class ConfigFileUtilTest {
|
24
|
|
25
|
@Test
|
26
|
public void testGetReadableResourceStream() {
|
27
|
String resourceFileName = ConfigFileUtil.MUST_EXIST_FILE;
|
28
|
try {
|
29
|
InputStream inputStream = CdmUtils.getReadableResourceStream(resourceFileName);
|
30
|
assertNotNull(inputStream);
|
31
|
} catch (IOException e) {
|
32
|
Assert.fail("IOException");
|
33
|
}
|
34
|
}
|
35
|
|
36
|
@Test
|
37
|
public void testGetFolderSeperator() {
|
38
|
Assert.assertEquals(File.separator, ConfigFileUtil.getFolderSeperator());
|
39
|
}
|
40
|
|
41
|
@Test
|
42
|
@Ignore
|
43
|
public void testGetHomeDir() {
|
44
|
Assert.assertEquals("", ConfigFileUtil.getCdmHomeDir());
|
45
|
}
|
46
|
|
47
|
|
48
|
}
|