-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIOUtilsDemoTest.java
More file actions
59 lines (49 loc) · 1.06 KB
/
IOUtilsDemoTest.java
File metadata and controls
59 lines (49 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package com;
import com.io.IOUtilsDemo;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;
import java.util.ArrayList;
import java.util.List;
/**
* IOUtilsDemo Tester.
*
* @author <Authors name>
* @since <pre>02/11/2018</pre>
* @version 1.0
*/
public class IOUtilsDemoTest {
private int length;
private String str;
private String fileName;
private String encoding;
private List<String> lineList;
@Before
public void before() throws Exception {
length=8;
str="Hello World!";
fileName="E:\\java编程\\IO文件.txt";
encoding="UTF-8";
lineList =new ArrayList<String>();
lineList.add("\n欢迎访问:");
lineList.add("github.com");
}
@After
public void after() throws Exception {
}
/**
*
* Method: read()
*
*/
@Test
public void testReadTest() throws Exception {
//TODO: Test goes here...
IOUtilsDemo.read(str,length);
}
@Test
public void testReadLines() throws Exception {
//TODO: Test goes here...
IOUtilsDemo.readLines(fileName);
}
}