ソースを参照

simple-cipher: add hint to @Ignore annotations

morrme 9 年 前
コミット
1a555e8a8e

+ 2
- 2
exercises/simple-cipher/src/test/java/SimpleCipherStepOneTest.java ファイルの表示

25
         assertEquals(cipherText, cipherWithDefaultKey.encode("aaaaaaaaaa"));
25
         assertEquals(cipherText, cipherWithDefaultKey.encode("aaaaaaaaaa"));
26
     }
26
     }
27
 
27
 
28
-    @Ignore
28
+    @Ignore("Remove to run test")
29
     @Test
29
     @Test
30
     public void cipherCanDecode() {
30
     public void cipherCanDecode() {
31
         String cipherText = "aaaaaaaaaa";
31
         String cipherText = "aaaaaaaaaa";
32
         assertEquals(cipherText, cipherWithDefaultKey.decode(cipherWithDefaultKey.getKey().substring(0, 10)));
32
         assertEquals(cipherText, cipherWithDefaultKey.decode(cipherWithDefaultKey.getKey().substring(0, 10)));
33
     }
33
     }
34
 
34
 
35
-    @Ignore
35
+    @Ignore("Remove to run test")
36
     @Test
36
     @Test
37
     public void cipherIsReversible() {
37
     public void cipherIsReversible() {
38
         String plainText = "abcdefghij";
38
         String plainText = "abcdefghij";

+ 7
- 7
exercises/simple-cipher/src/test/java/SimpleCipherStepThreeTest.java ファイルの表示

12
     @Rule
12
     @Rule
13
     public ExpectedException expectedException = ExpectedException.none();
13
     public ExpectedException expectedException = ExpectedException.none();
14
 
14
 
15
-    @Ignore
15
+    @Ignore("Remove to run test")
16
     @Test
16
     @Test
17
     public void cipherKeyIsMadeOfLetters() {
17
     public void cipherKeyIsMadeOfLetters() {
18
         assertTrue(new Cipher().getKey().matches("[a-z]+"));
18
         assertTrue(new Cipher().getKey().matches("[a-z]+"));
19
     }
19
     }
20
 
20
 
21
-    @Ignore
21
+    @Ignore("Remove to run test")
22
     @Test
22
     @Test
23
     public void defaultCipherKeyIs100Characters() {
23
     public void defaultCipherKeyIs100Characters() {
24
         assertEquals(100, new Cipher().getKey().length());
24
         assertEquals(100, new Cipher().getKey().length());
25
     }
25
     }
26
 
26
 
27
-    @Ignore
27
+    @Ignore("Remove to run test")
28
     @Test
28
     @Test
29
     public void cipherKeysAreRandomlyGenerated() {
29
     public void cipherKeysAreRandomlyGenerated() {
30
         String newKey = new Cipher().getKey();
30
         String newKey = new Cipher().getKey();
33
                 "both returned key: " + newKey, newKey.equals(new Cipher().getKey()));
33
                 "both returned key: " + newKey, newKey.equals(new Cipher().getKey()));
34
     }
34
     }
35
 
35
 
36
-    @Ignore
36
+    @Ignore("Remove to run test")
37
     @Test
37
     @Test
38
     public void cipherThrowsWithAllCapsKey() {
38
     public void cipherThrowsWithAllCapsKey() {
39
         expectedException.expect(IllegalArgumentException.class);
39
         expectedException.expect(IllegalArgumentException.class);
40
         new Cipher("ABCDEF");
40
         new Cipher("ABCDEF");
41
     }
41
     }
42
 
42
 
43
-    @Ignore
43
+    @Ignore("Remove to run test")
44
     @Test
44
     @Test
45
     public void cipherThrowsWithAnyCapsKey() {
45
     public void cipherThrowsWithAnyCapsKey() {
46
         expectedException.expect(IllegalArgumentException.class);
46
         expectedException.expect(IllegalArgumentException.class);
47
         new Cipher("abcdEFg");
47
         new Cipher("abcdEFg");
48
     }
48
     }
49
 
49
 
50
-    @Ignore
50
+    @Ignore("Remove to run test")
51
     @Test
51
     @Test
52
     public void cipherThrowsWithNumericKey() {
52
     public void cipherThrowsWithNumericKey() {
53
         expectedException.expect(IllegalArgumentException.class);
53
         expectedException.expect(IllegalArgumentException.class);
54
         new Cipher("12345");
54
         new Cipher("12345");
55
     }
55
     }
56
 
56
 
57
-    @Ignore
57
+    @Ignore("Remove to run test")
58
     @Test
58
     @Test
59
     public void cipherThrowsWithAnyNumericKey() {
59
     public void cipherThrowsWithAnyNumericKey() {
60
         expectedException.expect(IllegalArgumentException.class);
60
         expectedException.expect(IllegalArgumentException.class);

+ 9
- 9
exercises/simple-cipher/src/test/java/SimpleCipherStepTwoTest.java ファイルの表示

21
         cipherWithSetKey = new Cipher(key);
21
         cipherWithSetKey = new Cipher(key);
22
     }
22
     }
23
 
23
 
24
-    @Ignore
24
+    @Ignore("Remove to run test")
25
     @Test
25
     @Test
26
     public void cipherKeepsTheSubmittedKey() {
26
     public void cipherKeepsTheSubmittedKey() {
27
         assertEquals(key, cipherWithSetKey.getKey());
27
         assertEquals(key, cipherWithSetKey.getKey());
28
     }
28
     }
29
 
29
 
30
-    @Ignore
30
+    @Ignore("Remove to run test")
31
     @Test
31
     @Test
32
     public void cipherThrowsWithEmptyKey() {
32
     public void cipherThrowsWithEmptyKey() {
33
         expectedException.expect(IllegalArgumentException.class);
33
         expectedException.expect(IllegalArgumentException.class);
34
         new Cipher("");
34
         new Cipher("");
35
     }
35
     }
36
 
36
 
37
-    @Ignore
37
+    @Ignore("Remove to run test")
38
     @Test
38
     @Test
39
     public void cipherCanEncodeWithGivenKey() {
39
     public void cipherCanEncodeWithGivenKey() {
40
         String cipherText = "abcdefghij";
40
         String cipherText = "abcdefghij";
41
         assertEquals(cipherText, cipherWithSetKey.encode("aaaaaaaaaa"));
41
         assertEquals(cipherText, cipherWithSetKey.encode("aaaaaaaaaa"));
42
     }
42
     }
43
 
43
 
44
-    @Ignore
44
+    @Ignore("Remove to run test")
45
     @Test
45
     @Test
46
     public void cipherCanDecodeWithGivenKey() {
46
     public void cipherCanDecodeWithGivenKey() {
47
         String cipherText = "aaaaaaaaaa";
47
         String cipherText = "aaaaaaaaaa";
48
         assertEquals(cipherText, cipherWithSetKey.decode("abcdefghij"));
48
         assertEquals(cipherText, cipherWithSetKey.decode("abcdefghij"));
49
     }
49
     }
50
 
50
 
51
-    @Ignore
51
+    @Ignore("Remove to run test")
52
     @Test
52
     @Test
53
     public void cipherIsReversibleGivenKey() {
53
     public void cipherIsReversibleGivenKey() {
54
         String plainText = "abcdefghij";
54
         String plainText = "abcdefghij";
55
         assertEquals(plainText, cipherWithSetKey.decode(cipherWithSetKey.encode("abcdefghij")));
55
         assertEquals(plainText, cipherWithSetKey.decode(cipherWithSetKey.encode("abcdefghij")));
56
     }
56
     }
57
 
57
 
58
-    @Ignore
58
+    @Ignore("Remove to run test")
59
     @Test
59
     @Test
60
     public void cipherCanWrapEncode() {
60
     public void cipherCanWrapEncode() {
61
         String cipherText = "zabcdefghi";
61
         String cipherText = "zabcdefghi";
62
         assertEquals(cipherText, cipherWithSetKey.encode("zzzzzzzzzz"));
62
         assertEquals(cipherText, cipherWithSetKey.encode("zzzzzzzzzz"));
63
     }
63
     }
64
 
64
 
65
-    @Ignore
65
+    @Ignore("Remove to run test")
66
     @Test
66
     @Test
67
     public void cipherCanEncodeMessageThatIsShorterThanTheKey() {
67
     public void cipherCanEncodeMessageThatIsShorterThanTheKey() {
68
         String cipherText = "abcde";
68
         String cipherText = "abcde";
69
         assertEquals(cipherText, cipherWithSetKey.encode("aaaaa"));
69
         assertEquals(cipherText, cipherWithSetKey.encode("aaaaa"));
70
     }
70
     }
71
 
71
 
72
-    @Ignore
72
+    @Ignore("Remove to run test")
73
     @Test
73
     @Test
74
     public void cipherCanDecodeMessageThatIsShorterThanTheKey() {
74
     public void cipherCanDecodeMessageThatIsShorterThanTheKey() {
75
         String cipherText = "aaaaa";
75
         String cipherText = "aaaaa";
76
         assertEquals(cipherText, cipherWithSetKey.decode("abcde"));
76
         assertEquals(cipherText, cipherWithSetKey.decode("abcde"));
77
     }
77
     }
78
 
78
 
79
-    @Ignore
79
+    @Ignore("Remove to run test")
80
     @Test
80
     @Test
81
     public void cipherCanDoubleShiftEncode() {
81
     public void cipherCanDoubleShiftEncode() {
82
         String plainText = "iamapandabear";
82
         String plainText = "iamapandabear";