Revision 44b37b30
Added by Andreas Kohlbecker about 5 years ago
cdmlib-commons/src/test/java/eu/etaxonomy/cdm/common/CdmUtilsTest.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.cdm.common; |
11 | 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 | 12 |
import java.util.regex.Pattern; |
18 | 13 |
|
19 | 14 |
import org.apache.log4j.Level; |
... | ... | |
42 | 37 |
|
43 | 38 |
/************************** TESTS ****************************************/ |
44 | 39 |
|
45 |
@Test |
|
46 |
public void testGetReadableResourceStream() { |
|
47 |
String resourceFileName = CdmUtils.MUST_EXIST_FILE; |
|
48 |
try { |
|
49 |
InputStream inputStream = CdmUtils.getReadableResourceStream(resourceFileName); |
|
50 |
assertNotNull(inputStream); |
|
51 |
} catch (IOException e) { |
|
52 |
Assert.fail("IOException"); |
|
53 |
} |
|
54 |
} |
|
55 |
|
|
56 |
@Test |
|
57 |
public void testGetFolderSeperator() { |
|
58 |
Assert.assertEquals(File.separator, CdmUtils.getFolderSeperator()); |
|
59 |
} |
|
60 |
|
|
61 |
@Test |
|
62 |
public void testGetHomeDir() { |
|
63 |
//Assert.assertEquals("", CdmUtils.getHomeDir()); |
|
64 |
} |
|
65 |
|
|
66 | 40 |
@Test |
67 | 41 |
public void testFindLibrary() { |
68 | 42 |
if (logger.isEnabledFor(Level.DEBUG)) {logger.debug(CdmUtils.findLibrary(CdmUtils.class));} |
Also available in: Unified diff
ref #8189 moving folder funstins from CdmUtils to ConfigFileUtil