|
@@ -1,6 +1,7 @@
|
1
|
|
-import org.junit.Test;
|
2
|
1
|
|
3
|
|
-import static org.junit.Assert.*;
|
|
2
|
+import org.testng.Assert;
|
|
3
|
+import org.testng.annotations.Test;
|
|
4
|
+
|
4
|
5
|
|
5
|
6
|
public class ROT13Test {
|
6
|
7
|
|
|
@@ -16,7 +17,7 @@ public class ROT13Test {
|
16
|
17
|
String actual = cipher.rotate(s1, 'A');
|
17
|
18
|
|
18
|
19
|
// Then
|
19
|
|
- assertTrue(actual.equals(s2));
|
|
20
|
+ Assert.assertTrue(actual.equals(s2));
|
20
|
21
|
}
|
21
|
22
|
|
22
|
23
|
@Test
|
|
@@ -30,7 +31,7 @@ public class ROT13Test {
|
30
|
31
|
String actual = cipher.rotate(s1, 'D');
|
31
|
32
|
|
32
|
33
|
// Then
|
33
|
|
- assertTrue(actual.equals(s2));
|
|
34
|
+ Assert.assertTrue(actual.equals(s2));
|
34
|
35
|
}
|
35
|
36
|
|
36
|
37
|
@Test
|
|
@@ -45,7 +46,7 @@ public class ROT13Test {
|
45
|
46
|
System.out.println(s1);
|
46
|
47
|
System.out.println(actual);
|
47
|
48
|
// Then
|
48
|
|
- assertTrue(actual.equals(s2));
|
|
49
|
+ Assert.assertTrue(actual.equals(s2));
|
49
|
50
|
}
|
50
|
51
|
|
51
|
52
|
@Test
|
|
@@ -64,14 +65,14 @@ public class ROT13Test {
|
64
|
65
|
System.out.println(Q1);
|
65
|
66
|
System.out.println(A1);
|
66
|
67
|
// Then
|
67
|
|
- assertTrue(actual.equals(A1));
|
|
68
|
+ Assert.assertTrue(actual.equals(A1));
|
68
|
69
|
|
69
|
70
|
// When
|
70
|
71
|
String actual2 = cipher.decrypt(Q2);
|
71
|
72
|
System.out.println(Q2);
|
72
|
73
|
System.out.println(A2);
|
73
|
74
|
// Then
|
74
|
|
- assertTrue(actual2.equals(A2));
|
|
75
|
+ Assert.assertTrue(actual2.equals(A2));
|
75
|
76
|
}
|
76
|
77
|
@Test
|
77
|
78
|
public void cryptTest2() {
|
|
@@ -85,7 +86,7 @@ public class ROT13Test {
|
85
|
86
|
String actual = cipher.crypt(cipher.crypt(Q1));
|
86
|
87
|
System.out.println(actual);
|
87
|
88
|
// Then
|
88
|
|
- assertTrue(actual.equals(Q1));
|
|
89
|
+ Assert.assertTrue(actual.equals(Q1));
|
89
|
90
|
}
|
90
|
91
|
|
91
|
92
|
}
|