|
|
@@ -1,5 +1,6 @@
|
|
|
package cn.hutool.core.io.file;
|
|
|
|
|
|
+import org.junit.Assert;
|
|
|
import org.junit.Ignore;
|
|
|
import org.junit.Test;
|
|
|
|
|
|
@@ -33,4 +34,10 @@ public class PathUtilTest {
|
|
|
public void moveTest(){
|
|
|
PathUtil.move(Paths.get("d:/lombok.jar"), Paths.get("d:/test/"), false);
|
|
|
}
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void getMimeTypeTest(){
|
|
|
+ final String mimeType = PathUtil.getMimeType(Paths.get("d:/test/test.jpg"));
|
|
|
+ Assert.assertEquals("image/jpeg", mimeType);
|
|
|
+ }
|
|
|
}
|