3b91b81311b37bc1c2ad77ebef71b53b20fd2bfa
[cdmlib.git] / cdmlib-persistence / src / test / java / eu / etaxonomy / cdm / config / ConfigFileUtilTest.java
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.config;
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 import eu.etaxonomy.cdm.common.CdmUtils;
23
24
25 public class ConfigFileUtilTest {
26
27 @Test
28 public void testGetReadableResourceStream() {
29 String resourceFileName = ConfigFileUtil.MUST_EXIST_FILE;
30 try {
31 InputStream inputStream = CdmUtils.getReadableResourceStream(resourceFileName);
32 assertNotNull(inputStream);
33 } catch (IOException e) {
34 Assert.fail("IOException");
35 }
36 }
37
38 @Test
39 public void testGetFolderSeperator() {
40 Assert.assertEquals(File.separator, ConfigFileUtil.getFolderSeperator());
41 }
42
43 @Test
44 @Ignore
45 public void testGetHomeDir() {
46 Assert.assertEquals("", ConfigFileUtil.getCdmHomeDir());
47 }
48
49
50 }