-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRedundantPrintTest.java
39 lines (35 loc) · 1 KB
/
RedundantPrintTest.java
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
import org.junit.jupiter.api.Test;
public class RedundantPrintTest {
@Test
public void Print()
{
int value1 = 0;
int value2 = 2;
assertNotEquals(value1, value2);
System.out.print("Value 1 and Value 2 are not equal\n");
}
@Test
public void Printf()
{
int value1 = 0;
int value2 = 2;
assertNotEquals(value1, value2);
System.out.printf("Value 1 and Value 2 are not equal\n");
}
@Test
public void Println()
{
int value1 = 0;
int value2 = 2;
assertNotEquals(value1, value2);
System.out.println("Value 1 and Value 2 are not equal");
}
@Test
public void Write()
{
int value1 = 0;
int value2 = 2;
assertNotEquals(value1, value2);
System.out.write(new byte[]{'V', 'a', 'l', 'u', 'e', ' ', '1', ' ', 'a', 'n', 'd', ' ', 'V', 'a', 'l', 'u', 'e', ' ', '2', ' ', 'a', 'r', 'e', ' ', 'n', 'o', 't', ' ', 'e', 'q', 'u', 'a', 'l', '\n'}, 0, 34);
}
}