You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aggregation-platform/test/com/platform/test/FileOperationTest.java

48 lines
986 B

package com.platform.test;
import java.io.File;
import java.io.IOException;
import java.util.Properties;
import org.junit.Test;
import com.platform.utils.FileOperateHelper;
public class FileOperationTest {
@Test
public void addLastSeparator() {
System.out.println(FileOperateHelper.addLastSeparator("D:/gitTmp3/aggregation-platform"));
}
@Test
public void removeLastSeparator() {
System.out.println(FileOperateHelper.removeLastSeparator("D:/gitTmp3/aggregation-platform/"));
}
@Test
public void fileCreate() {
File f = new File("D:/Create1");
f.mkdir();
File f2 = new File("D:/Create1/1.txt");
try {
f2.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
File f3 = new File("D:/Create1");
f3.mkdir();
}
@Test
public void getsystem() {
Properties sys = System.getProperties();
System.out.println(sys.getProperty("os.name"));
}
}