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

46 lines
786 B
Java

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.");
}
}