-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUITest.java
More file actions
45 lines (34 loc) · 909 Bytes
/
Copy pathUITest.java
File metadata and controls
45 lines (34 loc) · 909 Bytes
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
package GradeSystemProjcect;
import static org.junit.Assert.*;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class UITest {
/*UI aUI=null;
String aID = "985002006", aName = "·¨¨Î»T";
@Before
public void setUp() throws Exception {
// aUI=new UI();
}
@After
public void tearDown() throws Exception {
UI aUI=null;
}
@Test
public final void testShowWelcomeMsg() {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(baos);
PrintStream old = System.out;
System.setOut(ps);
aUI.showWelcomeMsg(aID);
System.out.flush();
System.setOut(old);
assertEquals("Welcome, " + aName, baos.toString());
}
@Test
public final void testPromptCommand() {
fail("Not yet implemented"); // TODO
}*/
}