Demonstrating the benefit of commons-io instead of the simpler string dissection.

This commit is contained in:
Anthony Whitford
2015-10-13 23:59:31 -07:00
parent cd66a9ef61
commit 19a97a1706

View File

@@ -35,8 +35,8 @@ public class FileUtilsTest extends BaseTest {
*/
@Test
public void testGetFileExtension() {
String[] fileName = {"something-0.9.5.jar", "lib2-1.1.js"};
String[] expResult = {"jar", "js"};
String[] fileName = {"something-0.9.5.jar", "lib2-1.1.js", "dir.tmp/noext"};
String[] expResult = {"jar", "js", null};
for (int i = 0; i < fileName.length; i++) {
String result = FileUtils.getFileExtension(fileName[i]);