devinsy-strings/test/fr/devinsy/util/FileToolsTest.java

47 lines
786 B
Java
Raw Normal View History

2014-02-23 10:38:36 +01:00
package fr.devinsy.util;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
/**
*
* @author Christian P. Momon
*/
public class FileToolsTest
{
static protected org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(FileToolsTest.class);
/**
*
*/
@Before
public void before()
{
BasicConfigurator.configure();
Logger.getRootLogger().setLevel(Level.ERROR);
}
/**
*
*/
@Test
public void testGetExtension()
{
//
logger.debug("===== test starting...");
//
String extension = FileTools.getExtension("test.ext");
//
Assert.assertEquals(extension, "ext");
//
logger.debug("===== test done.");
}
}