Преглед изворни кода

Merge pull request #139 from jtigger/ignore-all-but-first-test

Ignore all but first test in hello-world
Matthew Morgan пре 10 година
родитељ
комит
38110bd9ec
88 измењених фајлова са 1205 додато и 83 уклоњено
  1. 7
    0
      bin/journey-test.sh
  2. 4
    1
      config.json
  3. 6
    0
      exercises/_template/build.gradle
  4. 6
    0
      exercises/accumulate/build.gradle
  5. 6
    0
      exercises/accumulate/src/test/java/AccumulateTest.java
  6. 6
    0
      exercises/acronym/build.gradle
  7. 8
    0
      exercises/acronym/src/test/java/AcronymTest.java
  8. 6
    0
      exercises/allergies/build.gradle
  9. 20
    0
      exercises/allergies/src/test/java/AllergiesTest.java
  10. 6
    0
      exercises/anagram/build.gradle
  11. 11
    0
      exercises/anagram/src/test/java/AnagramTest.java
  12. 6
    0
      exercises/atbash-cipher/build.gradle
  13. 5
    2
      exercises/atbash-cipher/src/test/java/AtbashTest.java
  14. 6
    0
      exercises/beer-song/build.gradle
  15. 5
    1
      exercises/beer-song/src/test/java/BeerSongTest.java
  16. 6
    0
      exercises/binary/build.gradle
  17. 2
    0
      exercises/binary/src/test/java/BinaryTest.java
  18. 6
    0
      exercises/bob/build.gradle
  19. 19
    0
      exercises/bob/src/test/java/BobTest.java
  20. 19
    0
      exercises/build.gradle
  21. 6
    0
      exercises/crypto-square/build.gradle
  22. 16
    0
      exercises/crypto-square/src/test/java/CryptoSquareTest.java
  23. 6
    0
      exercises/etl/build.gradle
  24. 5
    0
      exercises/etl/src/test/java/EtlTest.java
  25. 6
    0
      exercises/gigasecond/build.gradle
  26. 6
    0
      exercises/gigasecond/src/test/java/GigasecondTest.java
  27. 6
    1
      exercises/grade-school/build.gradle
  28. 8
    0
      exercises/grade-school/src/test/java/SchoolTest.java
  29. 6
    0
      exercises/hamming/build.gradle
  30. 10
    0
      exercises/hamming/src/test/java/HammingTest.java
  31. 489
    69
      exercises/hello-world/GETTING_STARTED.md
  32. 12
    0
      exercises/hello-world/build.gradle
  33. 3
    0
      exercises/hello-world/src/main/java/HelloWorld.java
  34. 5
    0
      exercises/hello-world/src/test/java/HelloWorldTest.java
  35. 6
    0
      exercises/hexadecimal/build.gradle
  36. 11
    0
      exercises/hexadecimal/src/test/java/HexadecimalTest.java
  37. 6
    0
      exercises/linked-list/build.gradle
  38. 6
    0
      exercises/linked-list/src/test/java/DequeTest.java
  39. 6
    0
      exercises/luhn/build.gradle
  40. 11
    0
      exercises/luhn/src/test/java/LuhnTest.java
  41. 6
    0
      exercises/meetup/build.gradle
  42. 92
    0
      exercises/meetup/src/test/java/MeetupTest.java
  43. 6
    0
      exercises/nth-prime/build.gradle
  44. 6
    0
      exercises/nth-prime/src/test/java/PrimeTest.java
  45. 6
    0
      exercises/nucleotide-count/build.gradle
  46. 19
    9
      exercises/nucleotide-count/src/test/java/NucleotideTest.java
  47. 6
    0
      exercises/octal/build.gradle
  48. 2
    0
      exercises/octal/src/test/java/OctalTest.java
  49. 6
    0
      exercises/pangram/build.gradle
  50. 6
    0
      exercises/pangram/src/test/java/PangramTest.java
  51. 6
    0
      exercises/pascals-triangle/build.gradle
  52. 7
    0
      exercises/pascals-triangle/src/test/java/PascalsTriangleTest.java
  53. 6
    0
      exercises/phone-number/build.gradle
  54. 9
    0
      exercises/phone-number/src/test/java/PhoneNumberTest.java
  55. 6
    0
      exercises/pig-latin/build.gradle
  56. 2
    0
      exercises/pig-latin/src/test/java/PigLatinTest.java
  57. 6
    0
      exercises/prime-factors/build.gradle
  58. 2
    0
      exercises/prime-factors/src/test/java/PrimeFactorsTest.java
  59. 6
    0
      exercises/raindrops/build.gradle
  60. 2
    0
      exercises/raindrops/src/test/java/RaindropsTest.java
  61. 6
    0
      exercises/rna-transcription/build.gradle
  62. 7
    0
      exercises/rna-transcription/src/test/java/RnaTranscriptionTest.java
  63. 6
    0
      exercises/robot-name/build.gradle
  64. 4
    0
      exercises/robot-name/src/test/java/RobotTest.java
  65. 6
    0
      exercises/roman-numerals/build.gradle
  66. 2
    0
      exercises/roman-numerals/src/test/java/RomanNumeralsTest.java
  67. 6
    0
      exercises/scrabble-score/build.gradle
  68. 2
    0
      exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java
  69. 6
    0
      exercises/sieve/build.gradle
  70. 4
    0
      exercises/sieve/src/test/java/SieveTest.java
  71. 6
    0
      exercises/simple-cipher/build.gradle
  72. 6
    0
      exercises/simple-cipher/src/test/java/IncorrectKeyCipherTest.java
  73. 7
    0
      exercises/simple-cipher/src/test/java/RandomKeyCipherTest.java
  74. 9
    0
      exercises/simple-cipher/src/test/java/SubstitutionCipherTest.java
  75. 6
    0
      exercises/simple-linked-list/build.gradle
  76. 8
    0
      exercises/simple-linked-list/src/test/java/SimpleLinkedListTest.java
  77. 6
    0
      exercises/space-age/build.gradle
  78. 10
    0
      exercises/space-age/src/test/java/SpaceAgeTest.java
  79. 6
    0
      exercises/strain/build.gradle
  80. 13
    0
      exercises/strain/src/test/java/StrainTest.java
  81. 6
    0
      exercises/triangle/build.gradle
  82. 16
    0
      exercises/triangle/src/test/java/TriangleTest.java
  83. 6
    0
      exercises/trinary/build.gradle
  84. 5
    0
      exercises/trinary/src/test/java/TrinaryTest.java
  85. 6
    0
      exercises/word-count/build.gradle
  86. 7
    0
      exercises/word-count/src/test/java/WordCountTest.java
  87. 21
    0
      scripts/increase-test-logging.sh
  88. 15
    0
      scripts/insert-ignores.sh

+ 7
- 0
bin/journey-test.sh Прегледај датотеку

@@ -3,6 +3,9 @@ SCRIPTPATH=$( pushd `dirname $0` > /dev/null && pwd && popd > /dev/null )
3 3
 EXECPATH=$PWD
4 4
 XAPI_PID=""
5 5
 
6
+# Makes CI output easier to read
7
+TERM=dumb
8
+
6 9
 function on_exit() {
7 10
   echo ">>> on_exit()"
8 11
   if [ "$XAPI_PID" != "" ] ; then
@@ -177,6 +180,7 @@ solve_all_exercises() {
177 180
   local EXERCISES=`cat config.json | jq '.problems []' --raw-output`
178 181
   local TOTAL_EXERCISES=`cat config.json | jq '.problems | length'`
179 182
   local CURRENT_EXERCISE_NUMBER=1
183
+  local TEMPFILE="${TMPDIR:-/tmp}/journey-test.sh-unignore_all_tests.txt"
180 184
 
181 185
   pushd ${EXERCISM_HOME} >/dev/null
182 186
   for EXERCISE in $EXERCISES; do
@@ -186,6 +190,9 @@ solve_all_exercises() {
186 190
     $EXERCISM fetch java $EXERCISE
187 191
     cp -R -H $REPO_ROOT/exercises/$EXERCISE/src/example/java/* $EXERCISM_HOME/java/$EXERCISE/src/main/java/
188 192
     pushd $EXERCISM_HOME/java/$EXERCISE/ >/dev/null
193
+    for TESTFILE in `find . -name "*Test.java"`; do
194
+      sed 's/@Ignore//' $TESTFILE > "$TEMPFILE" && mv "$TEMPFILE" "$TESTFILE"
195
+    done
189 196
     gradle test
190 197
     popd >/dev/null
191 198
 

+ 4
- 1
config.json Прегледај датотеку

@@ -246,7 +246,10 @@
246 246
   "ignored": [
247 247
     "_template",
248 248
     ".gradle",
249
-    "docs"
249
+    "build",
250
+    "docs",
251
+    "gradle",
252
+    "scripts"
250 253
   ],
251 254
   "foregone": [
252 255
     "leap",

+ 6
- 0
exercises/_template/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 6
- 0
exercises/accumulate/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 6
- 0
exercises/accumulate/src/test/java/AccumulateTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import java.util.Arrays;
4 5
 import java.util.LinkedList;
@@ -8,6 +9,7 @@ import static org.junit.Assert.assertEquals;
8 9
 
9 10
 public class AccumulateTest {
10 11
 
12
+
11 13
     @Test
12 14
     public void emptyAccumulateProducesEmptyAccumulation() {
13 15
         List<Integer> input = new LinkedList<>();
@@ -15,6 +17,7 @@ public class AccumulateTest {
15 17
         assertEquals(expectedOutput, Accumulate.accumulate(input, x -> x * x));
16 18
     }
17 19
 
20
+    @Ignore
18 21
     @Test
19 22
     public void accumulateSquares() {
20 23
         List<Integer> input = Arrays.asList(1, 2, 3);
@@ -22,6 +25,7 @@ public class AccumulateTest {
22 25
         assertEquals(expectedOutput, Accumulate.accumulate(input, x -> x * x));
23 26
     }
24 27
 
28
+    @Ignore
25 29
     @Test
26 30
     public void accumulateUpperCases() {
27 31
         List<String> input = Arrays.asList("hello", "world");
@@ -29,6 +33,7 @@ public class AccumulateTest {
29 33
         assertEquals(expectedOutput, Accumulate.accumulate(input, x -> x.toUpperCase()));
30 34
     }
31 35
 
36
+    @Ignore
32 37
     @Test
33 38
     public void accumulateReversedStrings() {
34 39
         List<String> input = Arrays.asList("the quick brown fox etc".split(" "));
@@ -40,6 +45,7 @@ public class AccumulateTest {
40 45
         return new StringBuilder(input).reverse().toString();
41 46
     }
42 47
 
48
+    @Ignore
43 49
     @Test
44 50
     public void accumulateWithinAccumulate() {
45 51
         List<String> input1 = Arrays.asList("a", "b", "c");

+ 6
- 0
exercises/acronym/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 8
- 0
exercises/acronym/src/test/java/AcronymTest.java Прегледај датотеку

@@ -1,9 +1,11 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import static org.junit.Assert.assertEquals;
4 5
 
5 6
 public class AcronymTest {
6 7
 
8
+
7 9
     @Test
8 10
     public void fromTitleCasedPhrases() {
9 11
         final String phrase = "Portable Network Graphics";
@@ -11,6 +13,7 @@ public class AcronymTest {
11 13
         assertEquals(expected, Acronym.generate(phrase));
12 14
     }
13 15
 
16
+    @Ignore
14 17
     @Test
15 18
     public void fromOtherTitleCasedPhrases() {
16 19
         final String phrase = "Ruby on Rails";
@@ -18,6 +21,7 @@ public class AcronymTest {
18 21
         assertEquals(expected, Acronym.generate(phrase));
19 22
     }
20 23
 
24
+    @Ignore
21 25
     @Test
22 26
     public void fromInconsistentlyCasedPhrases() {
23 27
         final String phrase = "HyperText Markup Language";
@@ -25,6 +29,7 @@ public class AcronymTest {
25 29
         assertEquals(expected, Acronym.generate(phrase));
26 30
     }
27 31
 
32
+    @Ignore
28 33
     @Test
29 34
     public void fromPhrasesWithPunctuation() {
30 35
         final String phrase = "First In, First Out";
@@ -32,6 +37,7 @@ public class AcronymTest {
32 37
         assertEquals(expected, Acronym.generate(phrase));
33 38
     }
34 39
 
40
+    @Ignore
35 41
     @Test
36 42
     public void fromOtherPhrasesWithPunctuation() {
37 43
         final String phrase = "PHP: Hypertext Preprocessor";
@@ -39,6 +45,7 @@ public class AcronymTest {
39 45
         assertEquals(expected, Acronym.generate(phrase));
40 46
     }
41 47
 
48
+    @Ignore
42 49
     @Test
43 50
     public void fromPhrasesWithPunctuationAndSentenceCasing() {
44 51
         final String phrase = "Complementary metal-oxide semiconductor";
@@ -46,6 +53,7 @@ public class AcronymTest {
46 53
         assertEquals(expected, Acronym.generate(phrase));
47 54
     }
48 55
 
56
+    @Ignore
49 57
     @Test
50 58
     public void fromPhraseWithSingleLetterWord() {
51 59
         final String phrase = "Cat in a Hat";

+ 6
- 0
exercises/allergies/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 20
- 0
exercises/allergies/src/test/java/AllergiesTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import java.util.Arrays;
4 5
 import java.util.List;
@@ -7,6 +8,7 @@ import static org.junit.Assert.assertEquals;
7 8
 
8 9
 public class AllergiesTest {
9 10
 
11
+
10 12
     @Test
11 13
     public void noAllergiesMeansNotAllergicToAnything() {
12 14
         Allergies allergies = new Allergies(0);
@@ -17,6 +19,7 @@ public class AllergiesTest {
17 19
         assertEquals(false, allergies.isAllergicTo(Allergen.CATS));
18 20
     }
19 21
 
22
+    @Ignore
20 23
     @Test
21 24
     public void allergicToEggs() {
22 25
         Allergies allergies = new Allergies(1);
@@ -24,6 +27,7 @@ public class AllergiesTest {
24 27
         assertEquals(true, allergies.isAllergicTo(Allergen.EGGS));
25 28
     }
26 29
 
30
+    @Ignore
27 31
     @Test
28 32
     public void allergicToPeanuts() {
29 33
         Allergies allergies = new Allergies(2);
@@ -31,6 +35,7 @@ public class AllergiesTest {
31 35
         assertEquals(true, allergies.isAllergicTo(Allergen.PEANUTS));
32 36
     }
33 37
 
38
+    @Ignore
34 39
     @Test
35 40
     public void allergicToShellfish() {
36 41
         Allergies allergies = new Allergies(4);
@@ -38,6 +43,7 @@ public class AllergiesTest {
38 43
         assertEquals(true, allergies.isAllergicTo(Allergen.SHELLFISH));
39 44
     }
40 45
 
46
+    @Ignore
41 47
     @Test
42 48
     public void allergicToStrawberries() {
43 49
         Allergies allergies = new Allergies(8);
@@ -45,6 +51,7 @@ public class AllergiesTest {
45 51
         assertEquals(true, allergies.isAllergicTo(Allergen.STRAWBERRIES));
46 52
     }
47 53
 
54
+    @Ignore
48 55
     @Test
49 56
     public void allergicToTomatoes() {
50 57
         Allergies allergies = new Allergies(16);
@@ -52,6 +59,7 @@ public class AllergiesTest {
52 59
         assertEquals(true, allergies.isAllergicTo(Allergen.TOMATOES));
53 60
     }
54 61
 
62
+    @Ignore
55 63
     @Test
56 64
     public void allergicToChocolate() {
57 65
         Allergies allergies = new Allergies(32);
@@ -59,6 +67,7 @@ public class AllergiesTest {
59 67
         assertEquals(true, allergies.isAllergicTo(Allergen.CHOCOLATE));
60 68
     }
61 69
 
70
+    @Ignore
62 71
     @Test
63 72
     public void allergicToPollen() {
64 73
         Allergies allergies = new Allergies(64);
@@ -66,6 +75,7 @@ public class AllergiesTest {
66 75
         assertEquals(true, allergies.isAllergicTo(Allergen.POLLEN));
67 76
     }
68 77
 
78
+    @Ignore
69 79
     @Test
70 80
     public void allergicToCats() {
71 81
         Allergies allergies = new Allergies(128);
@@ -73,6 +83,7 @@ public class AllergiesTest {
73 83
         assertEquals(true, allergies.isAllergicTo(Allergen.CATS));
74 84
     }
75 85
 
86
+    @Ignore
76 87
     @Test
77 88
     public void isAllergicToEggsInAdditionToOtherStuff() {
78 89
         Allergies allergies = new Allergies(5);
@@ -80,6 +91,7 @@ public class AllergiesTest {
80 91
         assertEquals(true, allergies.isAllergicTo(Allergen.EGGS));
81 92
     }
82 93
 
94
+    @Ignore
83 95
     @Test
84 96
     public void noAllergies() {
85 97
         Allergies allergies = new Allergies(0);
@@ -87,6 +99,7 @@ public class AllergiesTest {
87 99
         assertEquals(0, allergies.getList().size());
88 100
     }
89 101
 
102
+    @Ignore
90 103
     @Test
91 104
     public void isAllergicToJustEggs() {
92 105
         Allergies allergies = new Allergies(1);
@@ -95,6 +108,7 @@ public class AllergiesTest {
95 108
         assertEquals(expectedAllergens, allergies.getList());
96 109
     }
97 110
 
111
+    @Ignore
98 112
     @Test
99 113
     public void isAllergicToJustPeanuts() {
100 114
         Allergies allergies = new Allergies(2);
@@ -103,6 +117,7 @@ public class AllergiesTest {
103 117
         assertEquals(expectedAllergens, allergies.getList());
104 118
     }
105 119
 
120
+    @Ignore
106 121
     @Test
107 122
     public void isAllergicToJustStrawberries() {
108 123
         Allergies allergies = new Allergies(8);
@@ -111,6 +126,7 @@ public class AllergiesTest {
111 126
         assertEquals(expectedAllergens, allergies.getList());
112 127
     }
113 128
 
129
+    @Ignore
114 130
     @Test
115 131
     public void isAllergicToEggsAndPeanuts() {
116 132
         Allergies allergies = new Allergies(3);
@@ -122,6 +138,7 @@ public class AllergiesTest {
122 138
         assertEquals(expectedAllergens, allergies.getList());
123 139
     }
124 140
 
141
+    @Ignore
125 142
     @Test
126 143
     public void isAllergicToEggsAndShellfish() {
127 144
         Allergies allergies = new Allergies(5);
@@ -133,6 +150,7 @@ public class AllergiesTest {
133 150
         assertEquals(expectedAllergens, allergies.getList());
134 151
     }
135 152
 
153
+    @Ignore
136 154
     @Test
137 155
     public void isAllergicToLotsOfStuff() {
138 156
         Allergies allergies = new Allergies(248);
@@ -147,6 +165,7 @@ public class AllergiesTest {
147 165
         assertEquals(expectedAllergens, allergies.getList());
148 166
     }
149 167
 
168
+    @Ignore
150 169
     @Test
151 170
     public void isAllergicToEverything() {
152 171
         Allergies allergies = new Allergies(255);
@@ -164,6 +183,7 @@ public class AllergiesTest {
164 183
         assertEquals(expectedAllergens, allergies.getList());
165 184
     }
166 185
 
186
+    @Ignore
167 187
     @Test
168 188
     public void ignoreNonAllergenScoreParts() {
169 189
         Allergies allergies = new Allergies(509);

+ 6
- 0
exercises/anagram/build.gradle Прегледај датотеку

@@ -10,3 +10,9 @@ dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
   testCompile "org.assertj:assertj-core:3.2.0"
12 12
 }
13
+test {
14
+  testLogging {
15
+    exceptionFormat = 'full'
16
+    events = ["passed", "failed", "skipped"]
17
+  }
18
+}

+ 11
- 0
exercises/anagram/src/test/java/AnagramTest.java Прегледај датотеку

@@ -3,15 +3,18 @@ import static org.assertj.core.api.Assertions.assertThat;
3 3
 import java.util.Arrays;
4 4
 import java.util.List;
5 5
 import org.junit.Test;
6
+import org.junit.Ignore;
6 7
 
7 8
 public class AnagramTest {
8 9
 
10
+
9 11
     @Test
10 12
     public void testNoMatches() {
11 13
         Anagram detector = new Anagram("diaper");
12 14
         assertThat(detector.match(Arrays.asList("hello", "world", "zombies", "pants"))).isEmpty();
13 15
     }
14 16
 
17
+    @Ignore
15 18
     @Test
16 19
     public void testSimpleAnagram() {
17 20
         Anagram detector = new Anagram("ant");
@@ -19,6 +22,7 @@ public class AnagramTest {
19 22
         assertThat(anagram).containsExactly("tan");
20 23
     }
21 24
 
25
+    @Ignore
22 26
     @Test
23 27
     public void testDetectMultipleAnagrams() {
24 28
         Anagram detector = new Anagram("master");
@@ -26,6 +30,7 @@ public class AnagramTest {
26 30
         assertThat(anagrams).contains("maters", "stream");
27 31
     }
28 32
 
33
+    @Ignore
29 34
     @Test
30 35
     public void testDoesNotConfuseDifferentDuplicates() {
31 36
         Anagram detector = new Anagram("galea");
@@ -33,6 +38,7 @@ public class AnagramTest {
33 38
         assertThat(anagrams).isEmpty();
34 39
     }
35 40
 
41
+    @Ignore
36 42
     @Test
37 43
     public void testIdenticalWordIsNotAnagram() {
38 44
         Anagram detector = new Anagram("corn");
@@ -40,18 +46,21 @@ public class AnagramTest {
40 46
         assertThat(anagrams).containsExactly("cron");
41 47
     }
42 48
 
49
+    @Ignore
43 50
     @Test
44 51
     public void testEliminateAnagramsWithSameChecksum() {
45 52
         Anagram detector = new Anagram("mass");
46 53
         assertThat(detector.match(Arrays.asList("last")).isEmpty());
47 54
     }
48 55
 
56
+    @Ignore
49 57
     @Test
50 58
     public void testEliminateAnagramSubsets() {
51 59
         Anagram detector = new Anagram("good");
52 60
         assertThat(detector.match(Arrays.asList("dog", "goody"))).isEmpty();
53 61
     }
54 62
 
63
+    @Ignore
55 64
     @Test
56 65
     public void testDetectAnagrams() {
57 66
         Anagram detector = new Anagram("listen");
@@ -59,6 +68,7 @@ public class AnagramTest {
59 68
         assertThat(anagrams).contains("inlets");
60 69
     }
61 70
 
71
+    @Ignore
62 72
     @Test
63 73
     public void testMultipleAnagrams() {
64 74
         Anagram detector = new Anagram("allergy");
@@ -66,6 +76,7 @@ public class AnagramTest {
66 76
         assertThat(anagrams).contains("gallery", "largely", "regally");
67 77
     }
68 78
 
79
+    @Ignore
69 80
     @Test
70 81
     public void testAnagramsAreCaseInsensitive() {
71 82
         Anagram detector = new Anagram("Orchestra");

+ 6
- 0
exercises/atbash-cipher/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 5
- 2
exercises/atbash-cipher/src/test/java/AtbashTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 import org.junit.experimental.runners.Enclosed;
3 4
 import org.junit.runner.RunWith;
4 5
 import org.junit.runners.Parameterized;
@@ -35,7 +36,8 @@ public class AtbashTest {
35 36
             this.expectedOutput = expectedOutput;
36 37
         }
37 38
 
38
-        @Test
39
+
40
+    @Test
39 41
         public void test() {
40 42
             assertEquals(expectedOutput, Atbash.encode(input));
41 43
         }
@@ -60,7 +62,8 @@ public class AtbashTest {
60 62
             this.expectedOutput = expectedOutput;
61 63
         }
62 64
 
63
-        @Test
65
+        @Ignore
66
+    @Test
64 67
         public void test() {
65 68
             assertEquals(expectedOutput, Atbash.decode(input));
66 69
         }

+ 6
- 0
exercises/beer-song/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 5
- 1
exercises/beer-song/src/test/java/BeerSongTest.java Прегледај датотеку

@@ -1,9 +1,11 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import static org.junit.Assert.assertEquals;
4 5
 
5 6
 public class BeerSongTest {
6 7
 
8
+
7 9
     @Test
8 10
     public void singOneVerse() {
9 11
         assertEquals("8 bottles of beer on the wall, 8 bottles of beer.\nTake one down and pass it around, 7 bottles of beer on the wall.\n\n", BeerSong.verse(8));
@@ -13,12 +15,14 @@ public class BeerSongTest {
13 15
 
14 16
     }
15 17
 
18
+    @Ignore
16 19
     @Test
17 20
     public void singMoreThanOneVerse() {
18 21
         assertEquals("8 bottles of beer on the wall, 8 bottles of beer.\nTake one down and pass it around, 7 bottles of beer on the wall.\n\n7 bottles of beer on the wall, 7 bottles of beer.\nTake one down and pass it around, 6 bottles of beer on the wall.\n\n6 bottles of beer on the wall, 6 bottles of beer.\nTake one down and pass it around, 5 bottles of beer on the wall.\n\n", BeerSong.sing(8,6));
19 22
         assertEquals("3 bottles of beer on the wall, 3 bottles of beer.\nTake one down and pass it around, 2 bottles of beer on the wall.\n\n2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n\n1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n\n",BeerSong.sing(3,0));
20 23
     }
21 24
 
25
+    @Ignore
22 26
     @Test
23 27
     public void singEntireSong() {
24 28
         assertEquals("99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n\n" +
@@ -124,4 +128,4 @@ public class BeerSongTest {
124 128
                 BeerSong.singSong());
125 129
     }
126 130
 
127
-}
131
+}

+ 6
- 0
exercises/binary/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 2
- 0
exercises/binary/src/test/java/BinaryTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 import org.junit.runner.RunWith;
3 4
 import org.junit.runners.Parameterized;
4 5
 import org.junit.runners.Parameterized.Parameters;
@@ -38,6 +39,7 @@ public class BinaryTest {
38 39
         this.expectedOutput = expectedOutput;
39 40
     }
40 41
 
42
+
41 43
     @Test
42 44
     public void test() {
43 45
         Binary binary = new Binary(input);

+ 6
- 0
exercises/bob/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 19
- 0
exercises/bob/src/test/java/BobTest.java Прегледај датотеку

@@ -1,10 +1,12 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import static org.junit.Assert.*;
4 5
 
5 6
 public class BobTest {
6 7
     private final Bob bob = new Bob();
7 8
 
9
+
8 10
     @Test
9 11
     public void saySomething() {
10 12
         assertEquals(
@@ -13,6 +15,7 @@ public class BobTest {
13 15
         );
14 16
     }
15 17
 
18
+    @Ignore
16 19
     @Test
17 20
     public void shouting() {
18 21
         assertEquals(
@@ -21,6 +24,7 @@ public class BobTest {
21 24
         );
22 25
     }
23 26
 
27
+    @Ignore
24 28
     @Test
25 29
     public void askingAQuestion() {
26 30
         assertEquals(
@@ -29,6 +33,7 @@ public class BobTest {
29 33
         );
30 34
     }
31 35
 
36
+    @Ignore
32 37
     @Test
33 38
     public void askingANumericQuestion() {
34 39
         assertEquals(
@@ -37,6 +42,7 @@ public class BobTest {
37 42
         );
38 43
     }
39 44
 
45
+    @Ignore
40 46
     @Test
41 47
     public void talkingForcefully() {
42 48
         assertEquals(
@@ -45,6 +51,7 @@ public class BobTest {
45 51
         );
46 52
     }
47 53
 
54
+    @Ignore
48 55
     @Test
49 56
     public void usingAcronymsInRegularSpeech() {
50 57
         assertEquals(
@@ -52,6 +59,7 @@ public class BobTest {
52 59
         );
53 60
     }
54 61
 
62
+    @Ignore
55 63
     @Test
56 64
     public void forcefulQuestions() {
57 65
         assertEquals(
@@ -59,6 +67,7 @@ public class BobTest {
59 67
         );
60 68
     }
61 69
 
70
+    @Ignore
62 71
     @Test
63 72
     public void shoutingNumbers() {
64 73
         assertEquals(
@@ -66,6 +75,7 @@ public class BobTest {
66 75
         );
67 76
     }
68 77
 
78
+    @Ignore
69 79
     @Test
70 80
     public void onlyNumbers() {
71 81
         assertEquals(
@@ -73,6 +83,7 @@ public class BobTest {
73 83
         );
74 84
     }
75 85
 
86
+    @Ignore
76 87
     @Test
77 88
     public void questionWithOnlyNumbers() {
78 89
         assertEquals(
@@ -80,6 +91,7 @@ public class BobTest {
80 91
         );
81 92
     }
82 93
 
94
+    @Ignore
83 95
     @Test
84 96
     public void shoutingWithSpecialCharacters() {
85 97
         assertEquals(
@@ -87,6 +99,7 @@ public class BobTest {
87 99
         );
88 100
     }
89 101
 
102
+    @Ignore
90 103
     @Test
91 104
     public void shoutingWithUmlauts() {
92 105
         assertEquals(
@@ -94,6 +107,7 @@ public class BobTest {
94 107
         );
95 108
     }
96 109
 
110
+    @Ignore
97 111
     @Test
98 112
     public void calmlySpeakingWithUmlauts() {
99 113
         assertEquals(
@@ -101,6 +115,7 @@ public class BobTest {
101 115
         );
102 116
     }
103 117
 
118
+    @Ignore
104 119
     @Test
105 120
     public void shoutingWithNoExclamationMark() {
106 121
         assertEquals(
@@ -108,6 +123,7 @@ public class BobTest {
108 123
         );
109 124
     }
110 125
 
126
+    @Ignore
111 127
     @Test
112 128
     public void statementContainingQuestionMark() {
113 129
         assertEquals(
@@ -115,6 +131,7 @@ public class BobTest {
115 131
         );
116 132
     }
117 133
 
134
+    @Ignore
118 135
     @Test
119 136
     public void prattlingOn() {
120 137
         assertEquals(
@@ -122,6 +139,7 @@ public class BobTest {
122 139
         );
123 140
     }
124 141
 
142
+    @Ignore
125 143
     @Test
126 144
     public void silence() {
127 145
         assertEquals(
@@ -129,6 +147,7 @@ public class BobTest {
129 147
         );
130 148
     }
131 149
 
150
+    @Ignore
132 151
     @Test
133 152
     public void prolongedSilence() {
134 153
         assertEquals(

+ 19
- 0
exercises/build.gradle Прегледај датотеку

@@ -18,5 +18,24 @@ subprojects { project ->
18 18
     project["compileStarterSourceJava"].doFirst { compileTask ->
19 19
       println "  (source = " + compileTask.source.asPath + ")"
20 20
     }
21
+
22
+    // In lieu of being able to disable @Ignore in JUnit tests, we filter
23
+    // those annotations, placing the edited tests in the path named here.
24
+    test {
25
+      java.srcDirs = ["build/gen/test/java"]
26
+    }
27
+    project["compileTestJava"].doFirst { compileTask ->
28
+      println "  (source = " + compileTask.source.asPath + ")"
29
+    }
21 30
   }
31
+
32
+  task copyTestsFilteringIgnores(type: Copy) {
33
+    from "src/test/java"
34
+    into "build/gen/test/java"
35
+    filter { line ->
36
+      line.contains("@Ignore") ? "" : line
37
+    }
38
+  }
39
+
40
+  test.dependsOn(copyTestsFilteringIgnores)
22 41
 }

+ 6
- 0
exercises/crypto-square/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 16
- 0
exercises/crypto-square/src/test/java/CryptoSquareTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import java.util.Arrays;
4 5
 import java.util.List;
@@ -7,6 +8,7 @@ import static org.junit.Assert.assertEquals;
7 8
 
8 9
 public class CryptoSquareTest {
9 10
 
11
+
10 12
     @Test
11 13
     public void strangeCharactersAreStrippedDuringNormalization() {
12 14
         Crypto crypto = new Crypto("s#$%^&plunk");
@@ -15,6 +17,7 @@ public class CryptoSquareTest {
15 17
         assertEquals(expectedOutput, crypto.getNormalizedPlaintext());
16 18
     }
17 19
 
20
+    @Ignore
18 21
     @Test
19 22
     public void lettersAreLowerCasedDuringNormalization() {
20 23
         Crypto crypto = new Crypto("WHOA HEY!");
@@ -23,6 +26,7 @@ public class CryptoSquareTest {
23 26
         assertEquals(expectedOutput, crypto.getNormalizedPlaintext());
24 27
     }
25 28
 
29
+    @Ignore
26 30
     @Test
27 31
     public void numbersAreKeptDuringNormalization() {
28 32
         Crypto crypto = new Crypto("1, 2, 3, GO!");
@@ -31,6 +35,7 @@ public class CryptoSquareTest {
31 35
         assertEquals(expectedOutput, crypto.getNormalizedPlaintext());
32 36
     }
33 37
 
38
+    @Ignore
34 39
     @Test
35 40
     public void smallestSquareSizeIs2() {
36 41
         Crypto crypto = new Crypto("1234");
@@ -39,6 +44,7 @@ public class CryptoSquareTest {
39 44
         assertEquals(expectedOutput, crypto.getSquareSize());
40 45
     }
41 46
 
47
+    @Ignore
42 48
     @Test
43 49
     public void sizeOfTextWhoseLengthIsPerfectSquareIsItsSquareRoot() {
44 50
         Crypto crypto = new Crypto("123456789");
@@ -47,6 +53,7 @@ public class CryptoSquareTest {
47 53
         assertEquals(expectedOutput, crypto.getSquareSize());
48 54
     }
49 55
 
56
+    @Ignore
50 57
     @Test
51 58
     public void sizeOfTextWhoseLengthIsNoPerfectSquareIsNextBiggestSquareRoot() {
52 59
         Crypto crypto = new Crypto("123456789abc");
@@ -55,6 +62,7 @@ public class CryptoSquareTest {
55 62
         assertEquals(expectedOutput, crypto.getSquareSize());
56 63
     }
57 64
 
65
+    @Ignore
58 66
     @Test
59 67
     public void sizeIsDeterminedByNormalizedText() {
60 68
         Crypto crypto = new Crypto("Oh hey, this is nuts!");
@@ -63,6 +71,7 @@ public class CryptoSquareTest {
63 71
         assertEquals(expectedOutput, crypto.getSquareSize());
64 72
     }
65 73
 
74
+    @Ignore
66 75
     @Test
67 76
     public void segmentsAreSplitBySquareSize() {
68 77
         Crypto crypto = new Crypto("Never vex thine heart with idle woes");
@@ -71,6 +80,7 @@ public class CryptoSquareTest {
71 80
         assertEquals(expectedOutput, crypto.getPlaintextSegments());
72 81
     }
73 82
 
83
+    @Ignore
74 84
     @Test
75 85
     public void segmentsAreSplitBySquareSizeUntilTextRunsOut() {
76 86
         Crypto crypto = new Crypto("ZOMG! ZOMBIES!!!");
@@ -79,6 +89,7 @@ public class CryptoSquareTest {
79 89
         assertEquals(expectedOutput, crypto.getPlaintextSegments());
80 90
     }
81 91
 
92
+    @Ignore
82 93
     @Test
83 94
     public void cipherTextCombinesTextByColumn() {
84 95
         Crypto crypto = new Crypto("First, solve the problem. Then, write the code.");
@@ -87,6 +98,7 @@ public class CryptoSquareTest {
87 98
         assertEquals(expectedOutput, crypto.getCipherText());
88 99
     }
89 100
 
101
+    @Ignore
90 102
     @Test
91 103
     public void cipherTextSkipsCellsWithNoText() {
92 104
         Crypto crypto = new Crypto("Time is an illusion. Lunchtime doubly so.");
@@ -95,6 +107,7 @@ public class CryptoSquareTest {
95 107
         assertEquals(expectedOutput, crypto.getCipherText());
96 108
     }
97 109
 
110
+    @Ignore
98 111
     @Test
99 112
     public void normalizedCipherTextIsSplitByHeightOfSquare() {
100 113
         Crypto crypto = new Crypto("Vampires are people too!");
@@ -103,6 +116,7 @@ public class CryptoSquareTest {
103 116
         assertEquals(expectedOutput, crypto.getNormalizedCipherText());
104 117
     }
105 118
 
119
+    @Ignore
106 120
     @Test
107 121
     public void normalizedCipherNotExactlyDivisibleBy5SpillsIntoSmallerSegment() {
108 122
         Crypto crypto = new Crypto("Madness, and then illumination.");
@@ -111,6 +125,7 @@ public class CryptoSquareTest {
111 125
         assertEquals(expectedOutput, crypto.getNormalizedCipherText());
112 126
     }
113 127
 
128
+    @Ignore
114 129
     @Test
115 130
     public void normalizedCipherIsSplitIntoSegmentsOfCorrectSize() {
116 131
         Crypto crypto = new Crypto("If man was meant to stay on the ground god would have given us roots");
@@ -119,6 +134,7 @@ public class CryptoSquareTest {
119 134
         assertEquals(expectedOutput, crypto.getNormalizedCipherText());
120 135
     }
121 136
 
137
+    @Ignore
122 138
     @Test
123 139
     public void normalizedCipherTextIsSplitIntoSegmentsOfCorrectSizeWithPunctuation() {
124 140
         Crypto crypto = new Crypto("Have a nice day. Feed the dog & chill out!");

+ 6
- 0
exercises/etl/build.gradle Прегледај датотеку

@@ -11,3 +11,9 @@ dependencies {
11 11
   testCompile "org.assertj:assertj-core:3.2.0"
12 12
   testCompile "com.google.guava:guava:16+"
13 13
 }
14
+test {
15
+  testLogging {
16
+    exceptionFormat = 'full'
17
+    events = ["passed", "failed", "skipped"]
18
+  }
19
+}

+ 5
- 0
exercises/etl/src/test/java/EtlTest.java Прегледај датотеку

@@ -1,5 +1,6 @@
1 1
 import com.google.common.collect.ImmutableMap;
2 2
 import org.junit.Test;
3
+import org.junit.Ignore;
3 4
 
4 5
 import java.util.Arrays;
5 6
 import java.util.List;
@@ -10,6 +11,7 @@ import static org.assertj.core.api.Assertions.assertThat;
10 11
 public class EtlTest {
11 12
     private final Etl etl = new Etl();
12 13
 
14
+
13 15
     @Test
14 16
     public void testTransformOneValue() {
15 17
         Map<Integer, List<String>> old = ImmutableMap.of(1, Arrays.asList("A"));
@@ -18,6 +20,7 @@ public class EtlTest {
18 20
         assertThat(etl.transform(old)).isEqualTo(expected);
19 21
     }
20 22
 
23
+    @Ignore
21 24
     @Test
22 25
     public void testTransformMoreValues() {
23 26
         Map<Integer, List<String>> old = ImmutableMap.of(
@@ -34,6 +37,7 @@ public class EtlTest {
34 37
         assertThat(etl.transform(old)).isEqualTo(expected);
35 38
     }
36 39
 
40
+    @Ignore
37 41
     @Test
38 42
     public void testMoreKeys() {
39 43
         Map<Integer, List<String>> old = ImmutableMap.of(
@@ -50,6 +54,7 @@ public class EtlTest {
50 54
         assertThat(etl.transform(old)).isEqualTo(expected);
51 55
     }
52 56
 
57
+    @Ignore
53 58
     @Test
54 59
     public void testFullDataset() {
55 60
         Map<Integer, List<String>> old = ImmutableMap.<Integer, List<String>>builder().

+ 6
- 0
exercises/gigasecond/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 6
- 0
exercises/gigasecond/src/test/java/GigasecondTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import java.time.LocalDate;
4 5
 import java.time.LocalDateTime;
@@ -8,6 +9,7 @@ import static org.junit.Assert.assertEquals;
8 9
 
9 10
 public class GigasecondTest {
10 11
 
12
+
11 13
     @Test
12 14
     public void modernTime() {
13 15
         Gigasecond gigaSecond = new Gigasecond(LocalDate.of(2011, Month.APRIL, 25));
@@ -15,6 +17,7 @@ public class GigasecondTest {
15 17
         assertEquals(LocalDateTime.of(2043, Month.JANUARY, 1, 1, 46, 40), gigaSecond.getDate());
16 18
     }
17 19
 
20
+    @Ignore
18 21
     @Test
19 22
     public void afterEpochTime() {
20 23
         Gigasecond gigaSecond = new Gigasecond(LocalDate.of(1977, Month.JUNE, 13));
@@ -22,6 +25,7 @@ public class GigasecondTest {
22 25
         assertEquals(LocalDateTime.of(2009, Month.FEBRUARY, 19, 1, 46, 40), gigaSecond.getDate());
23 26
     }
24 27
 
28
+    @Ignore
25 29
     @Test
26 30
     public void beforeEpochTime() {
27 31
         Gigasecond gigaSecond = new Gigasecond(LocalDate.of(1959, Month.JULY, 19));
@@ -29,6 +33,7 @@ public class GigasecondTest {
29 33
         assertEquals(LocalDateTime.of(1991, Month.MARCH, 27, 1, 46, 40), gigaSecond.getDate());
30 34
     }
31 35
 
36
+    @Ignore
32 37
     @Test
33 38
     public void withFullTimeSpecified() {
34 39
         Gigasecond gigaSecond = new Gigasecond(LocalDateTime.of(2015, Month.JANUARY, 24, 22, 0, 0));
@@ -36,6 +41,7 @@ public class GigasecondTest {
36 41
         assertEquals(LocalDateTime.of(2046, Month.OCTOBER, 2, 23, 46, 40), gigaSecond.getDate());
37 42
     }
38 43
 
44
+    @Ignore
39 45
     @Test
40 46
     public void withFullTimeSpecifiedAndDayRollover() {
41 47
         Gigasecond gigaSecond = new Gigasecond(LocalDateTime.of(2015, Month.JANUARY, 24, 23, 59, 59));

+ 6
- 1
exercises/grade-school/build.gradle Прегледај датотеку

@@ -10,4 +10,9 @@ dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
   testCompile "org.assertj:assertj-core:3.2.0"
12 12
 }
13
-
13
+test {
14
+  testLogging {
15
+    exceptionFormat = 'full'
16
+    events = ["passed", "failed", "skipped"]
17
+  }
18
+}

+ 8
- 0
exercises/grade-school/src/test/java/SchoolTest.java Прегледај датотеку

@@ -1,6 +1,7 @@
1 1
 import static org.assertj.core.api.Assertions.assertThat;
2 2
 
3 3
 import org.junit.Test;
4
+import org.junit.Ignore;
4 5
 
5 6
 import java.util.Arrays;
6 7
 import java.util.HashMap;
@@ -10,17 +11,20 @@ import java.util.Map;
10 11
 public class SchoolTest {
11 12
   private final School school = new School();
12 13
 
14
+
13 15
   @Test
14 16
   public void startsWithNoStudents() {
15 17
     assertThat(school.db()).isEmpty();
16 18
   }
17 19
 
20
+  @Ignore
18 21
   @Test
19 22
   public void addsStudents() {
20 23
     school.add("Aimee", 2);
21 24
     assertThat(school.db().get(2)).contains("Aimee");
22 25
   }
23 26
 
27
+  @Ignore
24 28
   @Test
25 29
   public void addsMoreStudentsInSameGrade() {
26 30
     final int grade = 2;
@@ -31,6 +35,7 @@ public class SchoolTest {
31 35
     assertThat(school.db().get(grade)).hasSize(3).contains("James", "Blair", "Paul");
32 36
   }
33 37
 
38
+  @Ignore
34 39
   @Test
35 40
   public void addsStudentsInMultipleGrades() {
36 41
     school.add("Chelsea", 3);
@@ -41,6 +46,7 @@ public class SchoolTest {
41 46
     assertThat(school.db().get(7)).hasSize(1).contains("Logan");
42 47
   }
43 48
 
49
+  @Ignore
44 50
   @Test
45 51
   public void getsStudentsInAGrade() {
46 52
     school.add("Franklin", 5);
@@ -49,11 +55,13 @@ public class SchoolTest {
49 55
     assertThat(school.grade(5)).hasSize(2).contains("Franklin", "Bradley");
50 56
   }
51 57
 
58
+  @Ignore
52 59
   @Test
53 60
   public void getsStudentsInEmptyGrade() {
54 61
     assertThat(school.grade(1)).isEmpty();
55 62
   }
56 63
 
64
+  @Ignore
57 65
   @Test
58 66
   public void sortsSchool() {
59 67
     school.add("Jennifer", 4);

+ 6
- 0
exercises/hamming/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 10
- 0
exercises/hamming/src/test/java/HammingTest.java Прегледај датотеку

@@ -2,49 +2,59 @@ import static org.hamcrest.CoreMatchers.*;
2 2
 import static org.junit.Assert.*;
3 3
 
4 4
 import org.junit.Test;
5
+import org.junit.Ignore;
5 6
 
6 7
 public class HammingTest {
7 8
     
9
+
8 10
     @Test
9 11
     public void testNoDifferenceBetweenIdenticalStrands() {
10 12
         assertThat(Hamming.compute("A", "A"), is(0));
11 13
     }
12 14
 
15
+    @Ignore
13 16
     @Test
14 17
     public void testCompleteHammingDistanceOfForSingleNucleotideStrand() {
15 18
         assertThat(Hamming.compute("A", "G"), is(1));
16 19
     }
17 20
 
21
+    @Ignore
18 22
     @Test
19 23
     public void testCompleteHammingDistanceForSmallStrand() {
20 24
         assertThat(Hamming.compute("AG", "CT"), is(2)); 
21 25
     }
22 26
 
27
+    @Ignore
23 28
     @Test
24 29
     public void testSmallHammingDistance() {
25 30
         assertThat(Hamming.compute("AT", "CT"), is(1));
26 31
     }
27 32
 
33
+    @Ignore
28 34
     @Test
29 35
     public void testSmallHammingDistanceInLongerStrand() {
30 36
         assertThat(Hamming.compute("GGACG", "GGTCG"), is(1));
31 37
     }
32 38
 
39
+    @Ignore
33 40
     @Test(expected = IllegalArgumentException.class)
34 41
     public void testValidatesFirstStrandNotLonger() {
35 42
         Hamming.compute("AAAG", "AAA");
36 43
     }
37 44
 
45
+    @Ignore
38 46
     @Test(expected = IllegalArgumentException.class)
39 47
     public void testValidatesOtherStrandNotLonger() {
40 48
         Hamming.compute("AAA", "AAAG");
41 49
     }
42 50
 
51
+    @Ignore
43 52
     @Test
44 53
     public void testLargeHammingDistance() {
45 54
         assertThat(Hamming.compute("GATACA", "GCATAA"), is(4));
46 55
     }
47 56
 
57
+    @Ignore
48 58
     @Test
49 59
     public void testHammingDistanceInVeryLongStrand() {
50 60
         assertThat(Hamming.compute("GGACGGATTCTG", "AGGACGGATTCT"), is(9));

+ 489
- 69
exercises/hello-world/GETTING_STARTED.md Прегледај датотеку

@@ -1,89 +1,176 @@
1
-# Getting Started
1
+NOTE: You can also view the HTML version of this file here:
2
+https://github.com/exercism/xjava/blob/master/exercises/hello-world/GETTING_STARTED.md
2 3
 
3
-These exercises lean on Test-Driven Development (TDD), but they're not an exact match.
4
+* [Solving "Hello, World!"](#solving-hello-world)
5
+ * [Reading Gradle output](#reading-gradle-output)
6
+ * [Fixing the first failing test](#fixing-the-first-failing-test)
7
+ * [Enabling and fixing the second test](#enabling-and-fixing-the-second-test)
8
+ * [Enabling the last test](#enabling-the-last-test)
9
+ * [Refactoring](#refactoring)
10
+* [Submitting your first iteration](#submitting-your-first-iteration)
11
+* [Next Steps](#next-steps)
12
+ * [Review (and comment on) others' submissions to this exercise](#review-and-comment-on-others-submissions-to-this-exercise)
13
+ * [Extend an exercise](#extend-an-exercise)
4 14
 
5
-The following steps assume that you are in the base directory of the exercise.
15
+----
6 16
 
7
-You must have `gradle` installed.
17
+# Solving "Hello, World!"
8 18
 
9
-## Step 1
19
+Welcome to the first exercise on the Java track!
10 20
 
11
-Run the test suite. It's written using the JUnit framework, and can be run with gradle:
21
+This is a step-by-step guide to solving this exercise.
12 22
 
13
-```sh
14
-$ gradle test
15
-```
23
+Each exercise comes with a set of tests.  The first pass through the
24
+exercise is about getting all of the tests to pass, one at a time.
16 25
 
17
-This will fail, complaining that there is no method called `hello` for the `HelloWorld` class.
26
+If you have not installed the Java Development Kit and Gradle, you must do
27
+so now.  For help with this, see: http://exercism.io/languages/java/installing
18 28
 
19
-To fix the error, open `src/main/java/HelloWorld.java` and add a `hello` method that returns a `String`.
20
-The method can return an empty string `""` for now:
29
+----
21 30
 
22
-```java
23
-public class HelloWorld {
24
-    public static String hello() {
25
-        return "";
26
-    }
27
-}
28
-```
31
+This guide picks-up where [Running the Tests (in Java)](http://exercism.io/languages/java/tests)
32
+left off.  If you haven't reviewed those instructions, do so now.
29 33
 
30
-## Step 2
34
+The following instructions work equally well on Windows, Mac OS X and Linux.
31 35
 
32
-Run the tests again. It will give you a new error, since now the method exists, but the tests expect the
33
-method to accept one argument as input, a name.
36
+## Reading Gradle output
34 37
 
35
-The errors will look something like:
38
+Use Gradle to run the tests:
36 39
 
37 40
 ```
38 41
 $ gradle test
42
+```
43
+
44
+This command does a lot and displays a bunch of stuff.  Let's break it down...
45
+
46
+```
39 47
 :compileJava
40 48
 :processResources UP-TO-DATE
41 49
 :classes
50
+```
51
+
52
+Each line that begins with a colon (like `:compileJava`) is Gradle telling
53
+us that it's starting that task.  The first three tasks are about compiling
54
+the source code of our *solution*. We've done you a favor and included just
55
+enough code for the solution that it compiles.
56
+
57
+When a task is successful, it generally does not output anything.  This is
58
+why `:compileJava` and `:classes` do not produce any additional output.
59
+`:processResources` reports that it had nothing to do.
60
+
61
+So far, so good...
62
+
63
+The next three tasks are about compiling source code of the *tests*.
64
+
65
+```
42 66
 :compileTestJava
43
-/exercism/exercises/java/hello-world/src/test/java/HelloWorldTest.java:9: error: method hello in class HelloWorld cannot be applied to given types;
44
-        assertEquals("Hello, World!", HelloWorld.hello(""));
45
-                                                ^
46
-  required: no arguments
47
-  found: String
48
-  reason: actual and formal argument lists differ in length
67
+:processTestResources UP-TO-DATE
68
+:testClasses
69
+```
49 70
 
50
-  ...
71
+... with both sets of source code successfully compiled, Gradle turns to
72
+running the task you asked it to: executing the tests against the solution.
51 73
 
52
-4 errors
53
-:compileTestJava FAILED
74
+```
75
+:test
76
+
77
+HelloWorldTest > helloNoName FAILED
78
+    java.lang.AssertionError: expected:<Hello, World!> but was:<null>
79
+        at org.junit.Assert.fail(Assert.java:93)
80
+        at org.junit.Assert.failNotEquals(Assert.java:647)
81
+        at org.junit.Assert.assertEquals(Assert.java:128)
82
+        at org.junit.Assert.assertEquals(Assert.java:147)
83
+        at HelloWorldTest.helloNoName(HelloWorldTest.java:10)
84
+
85
+HelloWorldTest > helloSampleName SKIPPED
86
+
87
+HelloWorldTest > helloAnotherSampleName SKIPPED
88
+
89
+3 tests completed, 1 failed, 2 skipped
90
+:test FAILED
54 91
 
55 92
 FAILURE: Build failed with an exception.
56 93
 
57 94
 * What went wrong:
58
-Execution failed for task ':compileTestJava'.
59
-> Compilation failed; see the compiler error output for details.
95
+Execution failed for task ':test'.
96
+> There were failing tests. See the report at: file:///Users/jtigger/projects/exercism/xjava/build/exercism/java/hello-world/build/reports/tests/index.html
97
+
98
+* Try:
99
+Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
100
+
101
+BUILD FAILED
102
+
103
+Total time: 6.716 secs
104
+```
105
+
106
+Seeing the word "fail" TEN TIMES might give you the impression you've done
107
+something horribly wrong.  You haven't.  It's a whole lot of noise over
108
+a single test not passing.
109
+
110
+Let's focus in on the important bits:
111
+
112
+```
113
+HelloWorldTest > helloNoName FAILED
114
+    java.lang.AssertionError: expected:<Hello, World!> but was:<null>
115
+```
116
+
117
+...is read: "Within the test class named `HelloWorldTest`, the test method
118
+`helloNoName` did not pass because the solution did not satisfy an
119
+assertion.  Apparently, we expected to see the string 'Hello, World!' but
120
+the value `null` was returned instead.
121
+
122
+The last line of the stack trace tells us exactly where this unsatisfied
123
+assertion lives:
124
+
60 125
 ```
126
+        at HelloWorldTest.helloNoName(HelloWorldTest.java:10)
127
+```
128
+
129
+Looks like the crime was discovered on line 10 in the test file.
130
+
131
+Knowing these two facts,
132
+
133
+1. the return value was not what was expected, and
134
+2. the failure was on line 10 of the test,
135
+ 
136
+we can turn this failure into success.
61 137
 
62
-### Fixing the Error
63 138
 
64
-To fix it, open `src/main/java/HelloWorld.java` and add a `name` to the method the signature:
139
+
140
+## Fixing the first failing test
141
+
142
+In your favorite text editor, open `src/test/java/HelloWorldTest.java`
143
+and go to line 10.
65 144
 
66 145
 ```java
67
-public class HelloWorld {
68
-    public static String hello(String name) {
69
-        return "";
70
-    }
71
-}
146
+assertEquals("Hello, World!", HelloWorld.hello(""));
72 147
 ```
73 148
 
74
-Now the `hello` method accepts a `name` as an input.
149
+The test is expecting that `hello()`, when given an empty string (`""`),
150
+returns "Hello, World!".  Instead, `hello()` is returning `null`.
151
+Let's fix that.
75 152
 
76
-### Understanding Test Failures
153
+Open `src/main/java/HelloWorld.java`.
77 154
 
78
-Test failures will either be compilation errors or test failures. So far, we've been dealing with compilation
79
-errors. Once our test and main code successful compile, `gradle` will run the actual test suite.
155
+```java
156
+public class HelloWorld {
157
+  public static String hello(String name) {
158
+    return null;
159
+  }
160
+}
161
+```
80 162
 
81
-## Step 3
163
+Let's change that to return the expected string:
82 164
 
83
-Run the tests again. You'll notice that the gradle output passes the `:compileTestJava` phase and fails
84
-at the `:test` phase.
165
+```java
166
+public class HelloWorld {
167
+  public static String hello(String name) {
168
+    return "Hello, World!";
169
+  }
170
+}
171
+```
85 172
 
86
-The errors will look something like:
173
+Save the file and run the tests again:
87 174
 
88 175
 ```
89 176
 $ gradle test
@@ -95,58 +182,322 @@ $ gradle test
95 182
 :testClasses
96 183
 :test
97 184
 
98
-HelloWorldTest > helloNoName FAILED
99
-    org.junit.ComparisonFailure at HelloWorldTest.java:9
185
+HelloWorldTest > helloAnotherSampleName SKIPPED
186
+
187
+HelloWorldTest > helloNoName PASSED
188
+
189
+HelloWorldTest > helloSampleName SKIPPED
190
+
191
+BUILD SUCCESSFUL
192
+
193
+Total time: 4.523 secs
194
+```
195
+
196
+"BUILD SUCCESSFUL"!  Woohoo! :)  You can see that `helloNoName()` test is
197
+now passing.
198
+
199
+With one win under our belt, we can turn our focus to some other messages
200
+that we've been ignoring: the lines ending in "`SKIPPED`".
201
+
202
+Each test suite contains a series of tests, all of which have been marked
203
+to be skipped/ignored except the first one.  We did this to help you focus
204
+on getting one test running at a time.
100 205
 
206
+Let's tackle the next test...
207
+
208
+
209
+
210
+## Enabling and fixing the second test
211
+
212
+Right now, that second test is being skipped/ignored.  Let's enable it.
213
+
214
+(Re)open `src/test/java/HelloWorldTest.java` and find the second test:
215
+
216
+```java
101 217
 ...
218
+@Test
219
+@Ignore
220
+public void helloSampleName() {
221
+  assertEquals("Hello, Alice!", HelloWorld.hello("Alice"));
222
+}
223
+...
224
+```
102 225
 
103
-3 tests completed, 3 failed
104
-:test FAILED
226
+When the JUnit test runner sees that `@Ignore` annotation on the test
227
+method, it knows to skip over that test.  Remove that line:
228
+
229
+```java
230
+...
231
+@Test
232
+public void helloSampleName() {
233
+  assertEquals("Hello, Alice!", HelloWorld.hello("Alice"));
234
+}
235
+...
236
+```
237
+
238
+Now, when you run the tests, both tests run:
239
+
240
+```sh
241
+$ gradle test
242
+...
243
+:test
244
+
245
+HelloWorldTest > helloNoName PASSED
246
+
247
+HelloWorldTest > helloSampleName FAILED
248
+    org.junit.ComparisonFailure: expected:<Hello, [Alice]!> but was:<Hello, [World]!>
249
+        at org.junit.Assert.assertEquals(Assert.java:125)
250
+        at org.junit.Assert.assertEquals(Assert.java:147)
251
+        at HelloWorldTest.helloSampleName(HelloWorldTest.java:16)
252
+
253
+HelloWorldTest > helloAnotherSampleName SKIPPED
254
+
255
+3 tests completed, 1 failed, 1 skipped
256
+...
105 257
 ```
106 258
 
107
-These are actual test failures. It means that both our main and test java code is running but the test is
108
-expecting one outcome, but getting another.
259
+The first test, `helloNoName()` continues to pass.  We see that
260
+`helloSampleName` -- the test we just un-`@Ignore`'d -- is now running and
261
+failing.  Yay, failing test!  In fact, the "failure" message is just
262
+describing the difference between what the program does now and what it
263
+should do for us to call it "done."
109 264
 
110
-Open `src/test/java/HelloWorldTest.java` and go to line 9.
265
+Right now, we've hardcoded the greeting.  Enabling this second test has
266
+unleashed a new expectation: that our program incorporate a name given
267
+into that greeting.  When given the name "`Alice`", that's who should be
268
+greeted instead of "`World`".
269
+
270
+(Re)open `src/main/java/HelloWorld.java`.
111 271
 
112 272
 ```java
113
-assertEquals("Hello, World!", HelloWorld.hello(""));
273
+public class HelloWorld {
274
+  public static String hello(String name) {
275
+    return "Hello, World!";
276
+  }
277
+}
278
+```
279
+
280
+While `hello()` does accept a reference to a string named `name`, it is not
281
+using it in the output.  Let's change that:
282
+
283
+
284
+```java
285
+public class HelloWorld {
286
+  public static String hello(String name) {
287
+    return "Hello, " + name + "!";
288
+  }
289
+}
290
+```
291
+
292
+... and rerun the tests ...
293
+
294
+```
295
+$ gradle test
296
+:test
297
+
298
+HelloWorldTest > helloAnotherSampleName SKIPPED
299
+
300
+HelloWorldTest > helloNoName FAILED
301
+    org.junit.ComparisonFailure: expected:<Hello, [World]!> but was:<Hello, []!>
302
+        at org.junit.Assert.assertEquals(Assert.java:125)
303
+        at org.junit.Assert.assertEquals(Assert.java:147)
304
+        at HelloWorldTest.helloNoName(HelloWorldTest.java:10)
305
+
306
+HelloWorldTest > helloSampleName PASSED
307
+
308
+3 tests completed, 1 failed, 1 skipped
114 309
 ```
115 310
 
116
-The test is expecting that `hello` returns "Hello, World!", when given an empty string (`""`) as input.
117
-The easiest way to make the test pass is to return `"Hello, World!"` instead of `"".
311
+Wait... didn't we just fix the test?  Why is it failing?  Take a closer look...
118 312
 
313
+In fact, `helloSampleName()` *is* passing.  It's just that at the same time,
314
+we just inadvertently broke that first test: `helloNoName()`.
315
+
316
+This is one tiny example of the benefit of maintaining a test suite: if we
317
+use them to drive out our code, the second we break the program the tests
318
+say so.  Since we saw them passing just *before* our latest change,
319
+whatever we *just* did most likely cause that regression.
320
+
321
+Our latest change was making the greeting dependent on the name given. Our
322
+first test expects that if either a blank string or null are given as the
323
+name, then "`World`" should be substituted in.  Let's implement that.
324
+
325
+`src/main/java/HelloWorld.java`:
119 326
 ```java
120 327
 public class HelloWorld {
121
-    public static String hello(String name) {
122
-        return "Hello, World!";
328
+  public static String hello(String name) {
329
+    if(name == null || "".equals(name)) {
330
+      name = "World";
123 331
     }
332
+    return "Hello, " + name + "!";
333
+  }
124 334
 }
125 335
 ```
126 336
 
127
-## Wash, Rinse, Repeat
337
+... and re-run the tests ...
128 338
 
129
-Run the tests again.
339
+```
340
+$ gradle test
341
+...
342
+:test
130 343
 
131
-If it fails you're going to need to read the error message carefully to figure out what went wrong, fix the problem
132
-in the main code, and then try again until all the tests pass.
344
+HelloWorldTest > helloNoName PASSED
345
+
346
+HelloWorldTest > helloSampleName PASSED
347
+
348
+HelloWorldTest > helloAnotherSampleName SKIPPED
349
+
350
+BUILD SUCCESSFUL
351
+
352
+Total time: 4.804 secs
353
+```
354
+
355
+Excellent!  We're now (at least) two-thirds the way done.  Just one more
356
+test to go...
357
+
358
+
359
+
360
+## Enabling the last test
361
+
362
+(Re)open `src/test/java/HelloWorldTest.java` and find the last test:
363
+
364
+```java
365
+...
366
+@Test
367
+@Ignore
368
+public void helloAnotherSampleName() {
369
+    assertEquals("Hello, Bob!", HelloWorld.hello("Bob"));
370
+}
371
+...
372
+```
373
+
374
+... and remove it's `@Ignore` to enable it ...
375
+
376
+```java
377
+...
378
+@Test
379
+public void helloAnotherSampleName() {
380
+    assertEquals("Hello, Bob!", HelloWorld.hello("Bob"));
381
+}
382
+...
383
+```
384
+
385
+... and re-run the tests ...
133 386
 
134 387
 ```
135 388
 $ gradle test
136
-:compileJava
389
+:compileJava UP-TO-DATE
137 390
 :processResources UP-TO-DATE
138
-:classes
391
+:classes UP-TO-DATE
139 392
 :compileTestJava
140 393
 :processTestResources UP-TO-DATE
141 394
 :testClasses
142 395
 :test
143 396
 
397
+HelloWorldTest > helloNoName PASSED
398
+
399
+HelloWorldTest > helloSampleName PASSED
400
+
401
+HelloWorldTest > helloAnotherSampleName PASSED
402
+
144 403
 BUILD SUCCESSFUL
404
+
405
+Total time: 6.953 secs
145 406
 ```
146 407
 
147
-## Submit
408
+Oh, hello!  Turns out, the solution we put into place didn't just apply for
409
+"`Alice`" but "`Bob`" equally well.  In this case, the test succeeded with
410
+no additional code on our part.
411
+
412
+
413
+
414
+## Refactoring
415
+
416
+Now that you've got all the tests passing, you might consider whether
417
+the code is in the most readable/maintainable/efficient shape.  What makes
418
+for "good" design of software is a big topic.  The pursuit of it underlies
419
+much of what makes up the more valuable conversations on Exercism.
148 420
 
149
-When everything is passing, you can submit your code with the following command:
421
+For now, let's just take a quick review of our solution and see if there's
422
+any part of it we'd like to refactor.  Refactoring is changing the the way
423
+a bit of code reads without changing what it does.
424
+
425
+Right now, the details of detecting whether the caller of `hello()` has
426
+given a name or not (i.e. `name` is either `null` or an empty string) is
427
+sitting right next to the core responsibility of the method: to produce a
428
+personalized greeting.
429
+
430
+```java
431
+public class HelloWorld {
432
+  public static String hello(String name) {
433
+    if(name == null || "".equals(name)) {
434
+      name = "World";
435
+    }
436
+    return "Hello, " + name + "!";
437
+  }
438
+}
439
+```
440
+
441
+How would things read if we extracted those details into a separate method
442
+and at the same time, replaced the `if` with a ternary expression?
443
+
444
+```java
445
+public class HelloWorld {
446
+
447
+  public static String hello(String name) {
448
+    String whom = isBlank(name) ? "World" : name;
449
+    return "Hello, " + whom + "!";
450
+  }
451
+
452
+  private static boolean isBlank(String string) {
453
+    return string == null || "".equals(string);
454
+  }
455
+}
456
+```
457
+
458
+By extracting that logic into the `isBlank()` method, we've added a little
459
+abstraction to our program -- it's not as literal as it was before.  Yet,
460
+it allows us to defer *needing* to understand *how* "blankness" is
461
+detected.  If we can assume that `isBlank()` just works, we don't have to
462
+downshift in our head to those details.  Instead, we can remain at the same
463
+level of thinking: to whom are we greeting?
464
+
465
+The ternary operator allowed us to express that choice in a more compact
466
+form.  Less to read without losing the intent.
467
+
468
+Finally, we introduced another variable: `whom`.  Doing so gives a name to
469
+the output of the ternary expression.  We certainly could have continued
470
+to reuse `name`, but by introducing a second `String` to hold the
471
+calculated value this keeps crisp the two ideas: `name` is what's given
472
+and `whom` is what's been determined.
473
+
474
+We made a bunch of changes, let's make sure we didn't break the program!
475
+
476
+```
477
+$ gradle test
478
+...
479
+HelloWorldTest > helloNoName PASSED
480
+
481
+HelloWorldTest > helloSampleName PASSED
482
+
483
+HelloWorldTest > helloAnotherSampleName PASSED
484
+...
485
+```
486
+
487
+This illustrates another benefit of writing tests: you can make significant
488
+changes to the structure of the program and very quickly restore your
489
+confidence that the program still works.  These tests are a far cry from a
490
+"proof" of correctness, but well-written tests do a much better job of
491
+(very quickly) giving us evidence that it is.  Without them, we manually
492
+run the program with different inputs and/or inspecting the code
493
+line-by-line -- time-consuming and error prone.
494
+
495
+
496
+
497
+# Submitting your first iteration
498
+
499
+With a working solution that we've reviewed, we're ready to submit it to
500
+exercism.io.
150 501
 
151 502
 ```
152 503
 $ exercism submit src/main/java/HelloWorld.java
@@ -154,3 +505,72 @@ $ exercism submit src/main/java/HelloWorld.java
154 505
 
155 506
 
156 507
 
508
+# Next Steps
509
+
510
+From here, there are a number of paths you can take.
511
+
512
+
513
+## Move on to the next exercise
514
+
515
+There are many more exercises you can practice with.  Grab the next one!
516
+
517
+```
518
+$ exercism fetch java
519
+```
520
+
521
+
522
+## Review (and comment on) others' submissions to this exercise
523
+
524
+The heart of Exercism are the conversations about coding
525
+practices.  It's definitely fun to practice, but engaging with others
526
+both in their attempts and your own is how you get feedback.  That feedback
527
+can help point out what you're doing well and where you might need to
528
+improve.
529
+
530
+Some submissions will be nearly identical to yours; others will be
531
+completely different.  Seeing both kinds can be instructive and interesting.
532
+
533
+Note that you can only view submissions of others for exercises you have
534
+completed yourself.  This enriches the experience of reading others' code
535
+because you'll have your own experience of trying to solve the problem.
536
+
537
+Here's an up-to-date list of submissions on the Java track:
538
+
539
+http://exercism.io/tracks/java/exercises
540
+
541
+
542
+
543
+## Submit another iteration
544
+
545
+You are also encouraged to consider additional "requirements" on a given
546
+exercise.
547
+
548
+For example, you could add a test or two that requires that the greeting
549
+use the capitalized form on the person's name, regardless of the case they
550
+used.
551
+
552
+In that situation, you'd write a test to set-up that new expectation and
553
+then implement that in the code (the same process we just went through
554
+together, above).
555
+
556
+
557
+
558
+## Contribute to Exercism
559
+
560
+The entire of Exercism is Open Source and is the labor of love for over
561
+100 maintainers and many more contributors.
562
+
563
+A starting point to jumping in can be found here:
564
+
565
+https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md
566
+
567
+
568
+----
569
+
570
+Regardless of what you decide to do next, we sincerely hope you learn
571
+and enjoy being part of this community.  If at any time you need assistance
572
+do not hesitate to ask for help:
573
+
574
+http://exercism.io/languages/java/help
575
+
576
+Cheers!

+ 12
- 0
exercises/hello-world/build.gradle Прегледај датотеку

@@ -10,3 +10,15 @@ dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12 12
 
13
+test {
14
+  testLogging {
15
+    exceptionFormat = 'full'
16
+    events = ["passed", "failed", "skipped"]
17
+  }
18
+}
19
+test {
20
+  testLogging {
21
+    exceptionFormat = 'full'
22
+    events = ["passed", "failed", "skipped"]
23
+  }
24
+}

+ 3
- 0
exercises/hello-world/src/main/java/HelloWorld.java Прегледај датотеку

@@ -1,2 +1,5 @@
1 1
 public class HelloWorld {
2
+	public static String hello(String name) {
3
+      return null;
4
+	}
2 5
 }

+ 5
- 0
exercises/hello-world/src/test/java/HelloWorldTest.java Прегледај датотеку

@@ -1,9 +1,12 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
3
+import org.junit.Ignore;
2 4
 
3 5
 import static org.junit.Assert.assertEquals;
4 6
 
5 7
 public class HelloWorldTest {
6 8
 
9
+
7 10
     @Test
8 11
     public void helloNoName() {
9 12
         assertEquals("Hello, World!", HelloWorld.hello(""));
@@ -11,11 +14,13 @@ public class HelloWorldTest {
11 14
     }
12 15
 
13 16
     @Test
17
+    @Ignore
14 18
     public void helloSampleName() {
15 19
         assertEquals("Hello, Alice!", HelloWorld.hello("Alice"));
16 20
     }
17 21
 
18 22
     @Test
23
+    @Ignore
19 24
     public void helloAnotherSampleName() {
20 25
         assertEquals("Hello, Bob!", HelloWorld.hello("Bob"));
21 26
     }

+ 6
- 0
exercises/hexadecimal/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 11
- 0
exercises/hexadecimal/src/test/java/HexadecimalTest.java Прегледај датотеку

@@ -1,62 +1,73 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 import static org.junit.Assert.assertEquals;
3 4
 
4 5
 public class HexadecimalTest {
5 6
 
7
+
6 8
     @Test
7 9
     public void testOne(){
8 10
         int expected = 1;
9 11
         assertEquals(expected, Hexadecimal.toDecimal("1"));
10 12
     }
11 13
 
14
+    @Ignore
12 15
     @Test
13 16
     public void testC(){
14 17
         int expected = 12;
15 18
         assertEquals(expected, Hexadecimal.toDecimal("c"));
16 19
     }
17 20
 
21
+    @Ignore
18 22
     @Test
19 23
     public void test10(){
20 24
         int expected = 16;
21 25
         assertEquals(expected, Hexadecimal.toDecimal("10"));
22 26
     }
23 27
 
28
+    @Ignore
24 29
     @Test
25 30
     public void testAf(){
26 31
         int expected = 175;
27 32
         assertEquals(expected, Hexadecimal.toDecimal("af"));
28 33
     }
29 34
 
35
+    @Ignore
30 36
     @Test
31 37
     public void test100(){
32 38
         int expected = 256;
33 39
         assertEquals(expected, Hexadecimal.toDecimal("100"));
34 40
     }
35 41
 
42
+    @Ignore
36 43
     @Test
37 44
     public void test19ace(){
38 45
         int expected = 105166;
39 46
         assertEquals(expected, Hexadecimal.toDecimal("19ace"));
40 47
     }
41 48
 
49
+    @Ignore
42 50
     @Test
43 51
     public void testInvalid(){
44 52
         int expected = 0;
45 53
         assertEquals(expected, Hexadecimal.toDecimal("carrot"));
46 54
     }
47 55
 
56
+    @Ignore
48 57
     @Test
49 58
     public void testBlack(){
50 59
         int expected = 0;
51 60
         assertEquals(expected, Hexadecimal.toDecimal("000000"));
52 61
     }
53 62
 
63
+    @Ignore
54 64
     @Test
55 65
     public void testWhite(){
56 66
         int expected = 16777215;
57 67
         assertEquals(expected, Hexadecimal.toDecimal("ffffff"));
58 68
     }
59 69
 
70
+    @Ignore
60 71
     @Test
61 72
     public void testYellow(){
62 73
         int expected = 16776960;

+ 6
- 0
exercises/linked-list/build.gradle Прегледај датотеку

@@ -10,3 +10,9 @@ dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
   testCompile "org.assertj:assertj-core:3.2.0"
12 12
 }
13
+test {
14
+  testLogging {
15
+    exceptionFormat = 'full'
16
+    events = ["passed", "failed", "skipped"]
17
+  }
18
+}

+ 6
- 0
exercises/linked-list/src/test/java/DequeTest.java Прегледај датотеку

@@ -1,5 +1,6 @@
1 1
 import org.junit.Before;
2 2
 import org.junit.Test;
3
+import org.junit.Ignore;
3 4
 
4 5
 import static org.assertj.core.api.Assertions.assertThat;
5 6
 
@@ -11,6 +12,7 @@ public class DequeTest {
11 12
         subject = new Deque<>();
12 13
     }
13 14
 
15
+
14 16
     @Test
15 17
     public void testPushPop() {
16 18
         subject.push(10);
@@ -19,6 +21,7 @@ public class DequeTest {
19 21
         assertThat(subject.pop()).isEqualTo(10);
20 22
     }
21 23
 
24
+    @Ignore
22 25
     @Test
23 26
     public void testPushShift() {
24 27
         subject.push(10);
@@ -27,6 +30,7 @@ public class DequeTest {
27 30
         assertThat(subject.shift()).isEqualTo(20);
28 31
     }
29 32
 
33
+    @Ignore
30 34
     @Test
31 35
     public void testUnshiftShift() {
32 36
         subject.unshift(10);
@@ -35,6 +39,7 @@ public class DequeTest {
35 39
         assertThat(subject.shift()).isEqualTo(10);
36 40
     }
37 41
 
42
+    @Ignore
38 43
     @Test
39 44
     public void testUnshiftPop() {
40 45
         subject.unshift(10);
@@ -43,6 +48,7 @@ public class DequeTest {
43 48
         assertThat(subject.pop()).isEqualTo(20);
44 49
     }
45 50
 
51
+    @Ignore
46 52
     @Test
47 53
     public void testExample() {
48 54
         subject.push(10);

+ 6
- 0
exercises/luhn/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 11
- 0
exercises/luhn/src/test/java/LuhnTest.java Прегледај датотеку

@@ -1,10 +1,12 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import static org.junit.Assert.assertArrayEquals;
4 5
 import static org.junit.Assert.assertEquals;
5 6
 
6 7
 public class LuhnTest {
7 8
 
9
+
8 10
     @Test
9 11
     public void checkDigitIsRightMostDigit() {
10 12
         Luhn luhn = new Luhn(34567);
@@ -13,6 +15,7 @@ public class LuhnTest {
13 15
         assertEquals(expectedOutput, luhn.getCheckDigit());
14 16
     }
15 17
 
18
+    @Ignore
16 19
     @Test
17 20
     public void addendsDoublesEveryOtherNumberFromRight() {
18 21
         Luhn luhn = new Luhn(12121);
@@ -21,6 +24,7 @@ public class LuhnTest {
21 24
         assertArrayEquals(expectedOutput, luhn.getAddends());
22 25
     }
23 26
 
27
+    @Ignore
24 28
     @Test
25 29
     public void addendsSubtracts9WhenDoubledNumberIsMoreThan9() {
26 30
         Luhn luhn = new Luhn(8631);
@@ -29,6 +33,7 @@ public class LuhnTest {
29 33
         assertArrayEquals(expectedOutput, luhn.getAddends());
30 34
     }
31 35
 
36
+    @Ignore
32 37
     @Test
33 38
     public void checkSumAddsAddendsTogether1() {
34 39
         Luhn luhn = new Luhn(4913);
@@ -37,6 +42,7 @@ public class LuhnTest {
37 42
         assertEquals(expectedOutput, luhn.getCheckSum());
38 43
     }
39 44
 
45
+    @Ignore
40 46
     @Test
41 47
     public void checkSumAddsAddendsTogether2() {
42 48
         Luhn luhn = new Luhn(201773);
@@ -45,6 +51,7 @@ public class LuhnTest {
45 51
         assertEquals(expectedOutput, luhn.getCheckSum());
46 52
     }
47 53
 
54
+    @Ignore
48 55
     @Test
49 56
     public void numberIsValidWhenChecksumMod10IsZero1() {
50 57
         Luhn luhn = new Luhn(738);
@@ -53,6 +60,7 @@ public class LuhnTest {
53 60
         assertEquals(expectedOutput, luhn.isValid());
54 61
     }
55 62
 
63
+    @Ignore
56 64
     @Test
57 65
     public void numberIsValidWhenChecksumMod10IsZero2() {
58 66
         Luhn luhn = new Luhn(8739567);
@@ -61,6 +69,7 @@ public class LuhnTest {
61 69
         assertEquals(expectedOutput, luhn.isValid());
62 70
     }
63 71
 
72
+    @Ignore
64 73
     @Test
65 74
     public void luhnCanCreateSimpleNumbersWithValidCheckDigit() {
66 75
         long expectedOutput = 1230;
@@ -68,6 +77,7 @@ public class LuhnTest {
68 77
         assertEquals(expectedOutput, Luhn.create(123));
69 78
     }
70 79
 
80
+    @Ignore
71 81
     @Test
72 82
     public void luhnCanCreateLargeNumbersWithValidCheckDigit() {
73 83
         long expectedOutput = 8739567;
@@ -75,6 +85,7 @@ public class LuhnTest {
75 85
         assertEquals(expectedOutput, Luhn.create(873956));
76 86
     }
77 87
 
88
+    @Ignore
78 89
     @Test
79 90
     public void luhnCanCreateHugeNumbersWithValidCheckDigit() {
80 91
         long expectedOutput = 8372637564L;

+ 6
- 0
exercises/meetup/build.gradle Прегледај датотеку

@@ -11,3 +11,9 @@ dependencies {
11 11
   testCompile "junit:junit:4.10"
12 12
   testCompile "org.assertj:assertj-core:3.2.0"
13 13
 }
14
+test {
15
+  testLogging {
16
+    exceptionFormat = 'full'
17
+    events = ["passed", "failed", "skipped"]
18
+  }
19
+}

+ 92
- 0
exercises/meetup/src/test/java/MeetupTest.java Прегледај датотеку

@@ -1,6 +1,7 @@
1 1
 import org.joda.time.DateTime;
2 2
 import org.joda.time.DateTimeConstants;
3 3
 import org.junit.Test;
4
+import org.junit.Ignore;
4 5
 
5 6
 import static org.assertj.core.api.Assertions.assertThat;
6 7
 import static org.joda.time.DateTimeConstants.*;
@@ -9,6 +10,7 @@ import static org.joda.time.DateTimeConstants.*;
9 10
  * We use Joda Time here to encourage the use of a saner date manipulation library.
10 11
  */
11 12
 public class MeetupTest {
13
+
12 14
     @Test
13 15
     public void test_monteenth_of_may_2013() {
14 16
         DateTime expected = new DateTime(2013, 5, 13, 0, 0);
@@ -16,6 +18,7 @@ public class MeetupTest {
16 18
         assertThat(meetup.day(MONDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
17 19
     }
18 20
 
21
+    @Ignore
19 22
     @Test
20 23
     public void test_monteenth_of_august_2013() {
21 24
         DateTime expected = new DateTime(2013, 8, 19, 0, 0);
@@ -23,6 +26,7 @@ public class MeetupTest {
23 26
         assertThat(meetup.day(MONDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
24 27
     }
25 28
 
29
+    @Ignore
26 30
     @Test
27 31
     public void test_monteenth_of_september_2013() {
28 32
         DateTime expected = new DateTime(2013, 9, 16, 0, 0);
@@ -30,6 +34,7 @@ public class MeetupTest {
30 34
         assertThat(meetup.day(MONDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
31 35
     }
32 36
 
37
+    @Ignore
33 38
     @Test
34 39
     public void test_tuesteenth_of_march_2013() {
35 40
         DateTime expected = new DateTime(2013, 3, 19, 0, 0);
@@ -37,6 +42,7 @@ public class MeetupTest {
37 42
         assertThat(meetup.day(TUESDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
38 43
     }
39 44
 
45
+    @Ignore
40 46
     @Test
41 47
     public void test_tuesteenth_of_april_2013() {
42 48
         DateTime expected = new DateTime(2013, 4, 16, 0, 0);
@@ -44,6 +50,7 @@ public class MeetupTest {
44 50
         assertThat(meetup.day(TUESDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
45 51
     }
46 52
 
53
+    @Ignore
47 54
     @Test
48 55
     public void test_tuesteenth_of_august_2013() {
49 56
         DateTime expected = new DateTime(2013, 8, 13, 0, 0);
@@ -51,6 +58,7 @@ public class MeetupTest {
51 58
         assertThat(meetup.day(TUESDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
52 59
     }
53 60
 
61
+    @Ignore
54 62
     @Test
55 63
     public void test_wednesteenth_of_january_2013() {
56 64
         DateTime expected = new DateTime(2013, 1, 16, 0, 0);
@@ -58,6 +66,7 @@ public class MeetupTest {
58 66
         assertThat(meetup.day(WEDNESDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
59 67
     }
60 68
 
69
+    @Ignore
61 70
     @Test
62 71
     public void test_wednesteenth_of_february_2013() {
63 72
         DateTime expected = new DateTime(2013, 2, 13, 0, 0);
@@ -65,6 +74,7 @@ public class MeetupTest {
65 74
         assertThat(meetup.day(WEDNESDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
66 75
     }
67 76
 
77
+    @Ignore
68 78
     @Test
69 79
     public void test_wednesteenth_of_june_2013() {
70 80
         DateTime expected = new DateTime(2013, 6, 19, 0, 0);
@@ -72,6 +82,7 @@ public class MeetupTest {
72 82
         assertThat(meetup.day(WEDNESDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
73 83
     }
74 84
 
85
+    @Ignore
75 86
     @Test
76 87
     public void test_thursteenth_of_may_2013() {
77 88
         DateTime expected = new DateTime(2013, 5, 16, 0, 0);
@@ -79,6 +90,7 @@ public class MeetupTest {
79 90
         assertThat(meetup.day(THURSDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
80 91
     }
81 92
 
93
+    @Ignore
82 94
     @Test
83 95
     public void test_thursteenth_of_june_2013() {
84 96
         DateTime expected = new DateTime(2013, 6, 13, 0, 0);
@@ -86,6 +98,7 @@ public class MeetupTest {
86 98
         assertThat(meetup.day(THURSDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
87 99
     }
88 100
 
101
+    @Ignore
89 102
     @Test
90 103
     public void test_thursteenth_of_september_2013() {
91 104
         DateTime expected = new DateTime(2013, 9, 19, 0, 0);
@@ -93,6 +106,7 @@ public class MeetupTest {
93 106
         assertThat(meetup.day(THURSDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
94 107
     }
95 108
 
109
+    @Ignore
96 110
     @Test
97 111
     public void test_friteenth_of_april_2013() {
98 112
         DateTime expected = new DateTime(2013, 4, 19, 0, 0);
@@ -100,6 +114,7 @@ public class MeetupTest {
100 114
         assertThat(meetup.day(FRIDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
101 115
     }
102 116
 
117
+    @Ignore
103 118
     @Test
104 119
     public void test_friteenth_of_august_2013() {
105 120
         DateTime expected = new DateTime(2013, 8, 16, 0, 0);
@@ -107,6 +122,7 @@ public class MeetupTest {
107 122
         assertThat(meetup.day(FRIDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
108 123
     }
109 124
 
125
+    @Ignore
110 126
     @Test
111 127
     public void test_friteenth_of_september_2013() {
112 128
         DateTime expected = new DateTime(2013, 9, 13, 0, 0);
@@ -114,6 +130,7 @@ public class MeetupTest {
114 130
         assertThat(meetup.day(FRIDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
115 131
     }
116 132
 
133
+    @Ignore
117 134
     @Test
118 135
     public void test_saturteenth_of_february_2013() {
119 136
         DateTime expected = new DateTime(2013, 2, 16, 0, 0);
@@ -121,6 +138,7 @@ public class MeetupTest {
121 138
         assertThat(meetup.day(SATURDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
122 139
     }
123 140
 
141
+    @Ignore
124 142
     @Test
125 143
     public void test_saturteenth_of_april_2013() {
126 144
         DateTime expected = new DateTime(2013, 4, 13, 0, 0);
@@ -128,6 +146,7 @@ public class MeetupTest {
128 146
         assertThat(meetup.day(SATURDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
129 147
     }
130 148
 
149
+    @Ignore
131 150
     @Test
132 151
     public void test_saturteenth_of_october_2013() {
133 152
         DateTime expected = new DateTime(2013, 10, 19, 0, 0);
@@ -135,6 +154,7 @@ public class MeetupTest {
135 154
         assertThat(meetup.day(SATURDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
136 155
     }
137 156
 
157
+    @Ignore
138 158
     @Test
139 159
     public void test_sunteenth_of_may_2013() {
140 160
         DateTime expected = new DateTime(2013, 5, 19, 0, 0);
@@ -142,6 +162,7 @@ public class MeetupTest {
142 162
         assertThat(meetup.day(SUNDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
143 163
     }
144 164
 
165
+    @Ignore
145 166
     @Test
146 167
     public void test_sunteenth_of_june_2013() {
147 168
         DateTime expected = new DateTime(2013, 6, 16, 0, 0);
@@ -149,6 +170,7 @@ public class MeetupTest {
149 170
         assertThat(meetup.day(SUNDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
150 171
     }
151 172
 
173
+    @Ignore
152 174
     @Test
153 175
     public void test_sunteenth_of_october_2013() {
154 176
         DateTime expected = new DateTime(2013, 10, 13, 0, 0);
@@ -156,6 +178,7 @@ public class MeetupTest {
156 178
         assertThat(meetup.day(SUNDAY, MeetupSchedule.TEENTH)).isEqualTo(expected);
157 179
     }
158 180
 
181
+    @Ignore
159 182
     @Test
160 183
     public void test_first_monday_of_march_2013() {
161 184
         DateTime expected = new DateTime(2013, 3, 4, 0, 0);
@@ -163,6 +186,7 @@ public class MeetupTest {
163 186
         assertThat(meetup.day(MONDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
164 187
     }
165 188
 
189
+    @Ignore
166 190
     @Test
167 191
     public void test_first_monday_of_april_2013() {
168 192
         DateTime expected = new DateTime(2013, 4, 1, 0, 0);
@@ -170,6 +194,7 @@ public class MeetupTest {
170 194
         assertThat(meetup.day(MONDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
171 195
     }
172 196
 
197
+    @Ignore
173 198
     @Test
174 199
     public void test_first_tuesday_of_may_2013() {
175 200
         DateTime expected = new DateTime(2013, 5, 7, 0, 0);
@@ -177,6 +202,7 @@ public class MeetupTest {
177 202
         assertThat(meetup.day(TUESDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
178 203
     }
179 204
 
205
+    @Ignore
180 206
     @Test
181 207
     public void test_first_tuesday_of_june_2013() {
182 208
         DateTime expected = new DateTime(2013, 6, 4, 0, 0);
@@ -184,6 +210,7 @@ public class MeetupTest {
184 210
         assertThat(meetup.day(TUESDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
185 211
     }
186 212
 
213
+    @Ignore
187 214
     @Test
188 215
     public void test_first_wednesday_of_july_2013() {
189 216
         DateTime expected = new DateTime(2013, 7, 3, 0, 0);
@@ -191,6 +218,7 @@ public class MeetupTest {
191 218
         assertThat(meetup.day(WEDNESDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
192 219
     }
193 220
 
221
+    @Ignore
194 222
     @Test
195 223
     public void test_first_wednesday_of_august_2013() {
196 224
         DateTime expected = new DateTime(2013, 8, 7, 0, 0);
@@ -198,6 +226,7 @@ public class MeetupTest {
198 226
         assertThat(meetup.day(WEDNESDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
199 227
     }
200 228
 
229
+    @Ignore
201 230
     @Test
202 231
     public void test_first_thursday_of_september_2013() {
203 232
         DateTime expected = new DateTime(2013, 9, 5, 0, 0);
@@ -205,6 +234,7 @@ public class MeetupTest {
205 234
         assertThat(meetup.day(THURSDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
206 235
     }
207 236
 
237
+    @Ignore
208 238
     @Test
209 239
     public void test_first_thursday_of_october_2013() {
210 240
         DateTime expected = new DateTime(2013, 10, 3, 0, 0);
@@ -212,6 +242,7 @@ public class MeetupTest {
212 242
         assertThat(meetup.day(THURSDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
213 243
     }
214 244
 
245
+    @Ignore
215 246
     @Test
216 247
     public void test_first_friday_of_november_2013() {
217 248
         DateTime expected = new DateTime(2013, 11, 1, 0, 0);
@@ -219,6 +250,7 @@ public class MeetupTest {
219 250
         assertThat(meetup.day(FRIDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
220 251
     }
221 252
 
253
+    @Ignore
222 254
     @Test
223 255
     public void test_first_friday_of_december_2013() {
224 256
         DateTime expected = new DateTime(2013, 12, 6, 0, 0);
@@ -226,6 +258,7 @@ public class MeetupTest {
226 258
         assertThat(meetup.day(FRIDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
227 259
     }
228 260
 
261
+    @Ignore
229 262
     @Test
230 263
     public void test_first_saturday_of_january_2013() {
231 264
         DateTime expected = new DateTime(2013, 1, 5, 0, 0);
@@ -233,6 +266,7 @@ public class MeetupTest {
233 266
         assertThat(meetup.day(SATURDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
234 267
     }
235 268
 
269
+    @Ignore
236 270
     @Test
237 271
     public void test_first_saturday_of_february_2013() {
238 272
         DateTime expected = new DateTime(2013, 2, 2, 0, 0);
@@ -240,6 +274,7 @@ public class MeetupTest {
240 274
         assertThat(meetup.day(SATURDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
241 275
     }
242 276
 
277
+    @Ignore
243 278
     @Test
244 279
     public void test_first_sunday_of_march_2013() {
245 280
         DateTime expected = new DateTime(2013, 3, 3, 0, 0);
@@ -247,6 +282,7 @@ public class MeetupTest {
247 282
         assertThat(meetup.day(SUNDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
248 283
     }
249 284
 
285
+    @Ignore
250 286
     @Test
251 287
     public void test_first_sunday_of_april_2013() {
252 288
         DateTime expected = new DateTime(2013, 4, 7, 0, 0);
@@ -254,6 +290,7 @@ public class MeetupTest {
254 290
         assertThat(meetup.day(SUNDAY, MeetupSchedule.FIRST)).isEqualTo(expected);
255 291
     }
256 292
 
293
+    @Ignore
257 294
     @Test
258 295
     public void test_second_monday_of_march_2013() {
259 296
         DateTime expected = new DateTime(2013, 3, 11, 0, 0);
@@ -261,6 +298,7 @@ public class MeetupTest {
261 298
         assertThat(meetup.day(MONDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
262 299
     }
263 300
 
301
+    @Ignore
264 302
     @Test
265 303
     public void test_second_monday_of_april_2013() {
266 304
         DateTime expected = new DateTime(2013, 4, 8, 0, 0);
@@ -268,6 +306,7 @@ public class MeetupTest {
268 306
         assertThat(meetup.day(MONDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
269 307
     }
270 308
 
309
+    @Ignore
271 310
     @Test
272 311
     public void test_second_tuesday_of_may_2013() {
273 312
         DateTime expected = new DateTime(2013, 5, 14, 0, 0);
@@ -275,6 +314,7 @@ public class MeetupTest {
275 314
         assertThat(meetup.day(TUESDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
276 315
     }
277 316
 
317
+    @Ignore
278 318
     @Test
279 319
     public void test_second_tuesday_of_june_2013() {
280 320
         DateTime expected = new DateTime(2013, 6, 11, 0, 0);
@@ -282,6 +322,7 @@ public class MeetupTest {
282 322
         assertThat(meetup.day(TUESDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
283 323
     }
284 324
 
325
+    @Ignore
285 326
     @Test
286 327
     public void test_second_wednesday_of_july_2013() {
287 328
         DateTime expected = new DateTime(2013, 7, 10, 0, 0);
@@ -289,6 +330,7 @@ public class MeetupTest {
289 330
         assertThat(meetup.day(WEDNESDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
290 331
     }
291 332
 
333
+    @Ignore
292 334
     @Test
293 335
     public void test_second_wednesday_of_august_2013() {
294 336
         DateTime expected = new DateTime(2013, 8, 14, 0, 0);
@@ -296,6 +338,7 @@ public class MeetupTest {
296 338
         assertThat(meetup.day(WEDNESDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
297 339
     }
298 340
 
341
+    @Ignore
299 342
     @Test
300 343
     public void test_second_thursday_of_september_2013() {
301 344
         DateTime expected = new DateTime(2013, 9, 12, 0, 0);
@@ -303,6 +346,7 @@ public class MeetupTest {
303 346
         assertThat(meetup.day(THURSDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
304 347
     }
305 348
 
349
+    @Ignore
306 350
     @Test
307 351
     public void test_second_thursday_of_october_2013() {
308 352
         DateTime expected = new DateTime(2013, 10, 10, 0, 0);
@@ -310,6 +354,7 @@ public class MeetupTest {
310 354
         assertThat(meetup.day(THURSDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
311 355
     }
312 356
 
357
+    @Ignore
313 358
     @Test
314 359
     public void test_second_friday_of_november_2013() {
315 360
         DateTime expected = new DateTime(2013, 11, 8, 0, 0);
@@ -317,6 +362,7 @@ public class MeetupTest {
317 362
         assertThat(meetup.day(FRIDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
318 363
     }
319 364
 
365
+    @Ignore
320 366
     @Test
321 367
     public void test_second_friday_of_december_2013() {
322 368
         DateTime expected = new DateTime(2013, 12, 13, 0, 0);
@@ -324,6 +370,7 @@ public class MeetupTest {
324 370
         assertThat(meetup.day(FRIDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
325 371
     }
326 372
 
373
+    @Ignore
327 374
     @Test
328 375
     public void test_second_saturday_of_january_2013() {
329 376
         DateTime expected = new DateTime(2013, 1, 12, 0, 0);
@@ -331,6 +378,7 @@ public class MeetupTest {
331 378
         assertThat(meetup.day(SATURDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
332 379
     }
333 380
 
381
+    @Ignore
334 382
     @Test
335 383
     public void test_second_saturday_of_february_2013() {
336 384
         DateTime expected = new DateTime(2013, 2, 9, 0, 0);
@@ -338,6 +386,7 @@ public class MeetupTest {
338 386
         assertThat(meetup.day(SATURDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
339 387
     }
340 388
 
389
+    @Ignore
341 390
     @Test
342 391
     public void test_second_sunday_of_march_2013() {
343 392
         DateTime expected = new DateTime(2013, 3, 10, 0, 0);
@@ -345,6 +394,7 @@ public class MeetupTest {
345 394
         assertThat(meetup.day(SUNDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
346 395
     }
347 396
 
397
+    @Ignore
348 398
     @Test
349 399
     public void test_second_sunday_of_april_2013() {
350 400
         DateTime expected = new DateTime(2013, 4, 14, 0, 0);
@@ -352,6 +402,7 @@ public class MeetupTest {
352 402
         assertThat(meetup.day(SUNDAY, MeetupSchedule.SECOND)).isEqualTo(expected);
353 403
     }
354 404
 
405
+    @Ignore
355 406
     @Test
356 407
     public void test_third_monday_of_march_2013() {
357 408
         DateTime expected = new DateTime(2013, 3, 18, 0, 0);
@@ -359,6 +410,7 @@ public class MeetupTest {
359 410
         assertThat(meetup.day(MONDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
360 411
     }
361 412
 
413
+    @Ignore
362 414
     @Test
363 415
     public void test_third_monday_of_april_2013() {
364 416
         DateTime expected = new DateTime(2013, 4, 15, 0, 0);
@@ -366,6 +418,7 @@ public class MeetupTest {
366 418
         assertThat(meetup.day(MONDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
367 419
     }
368 420
 
421
+    @Ignore
369 422
     @Test
370 423
     public void test_third_tuesday_of_may_2013() {
371 424
         DateTime expected = new DateTime(2013, 5, 21, 0, 0);
@@ -373,6 +426,7 @@ public class MeetupTest {
373 426
         assertThat(meetup.day(TUESDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
374 427
     }
375 428
 
429
+    @Ignore
376 430
     @Test
377 431
     public void test_third_tuesday_of_june_2013() {
378 432
         DateTime expected = new DateTime(2013, 6, 18, 0, 0);
@@ -380,6 +434,7 @@ public class MeetupTest {
380 434
         assertThat(meetup.day(TUESDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
381 435
     }
382 436
 
437
+    @Ignore
383 438
     @Test
384 439
     public void test_third_wednesday_of_july_2013() {
385 440
         DateTime expected = new DateTime(2013, 7, 17, 0, 0);
@@ -387,6 +442,7 @@ public class MeetupTest {
387 442
         assertThat(meetup.day(WEDNESDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
388 443
     }
389 444
 
445
+    @Ignore
390 446
     @Test
391 447
     public void test_third_wednesday_of_august_2013() {
392 448
         DateTime expected = new DateTime(2013, 8, 21, 0, 0);
@@ -394,6 +450,7 @@ public class MeetupTest {
394 450
         assertThat(meetup.day(WEDNESDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
395 451
     }
396 452
 
453
+    @Ignore
397 454
     @Test
398 455
     public void test_third_thursday_of_september_2013() {
399 456
         DateTime expected = new DateTime(2013, 9, 19, 0, 0);
@@ -401,6 +458,7 @@ public class MeetupTest {
401 458
         assertThat(meetup.day(THURSDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
402 459
     }
403 460
 
461
+    @Ignore
404 462
     @Test
405 463
     public void test_third_thursday_of_october_2013() {
406 464
         DateTime expected = new DateTime(2013, 10, 17, 0, 0);
@@ -408,6 +466,7 @@ public class MeetupTest {
408 466
         assertThat(meetup.day(THURSDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
409 467
     }
410 468
 
469
+    @Ignore
411 470
     @Test
412 471
     public void test_third_friday_of_november_2013() {
413 472
         DateTime expected = new DateTime(2013, 11, 15, 0, 0);
@@ -415,6 +474,7 @@ public class MeetupTest {
415 474
         assertThat(meetup.day(FRIDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
416 475
     }
417 476
 
477
+    @Ignore
418 478
     @Test
419 479
     public void test_third_friday_of_december_2013() {
420 480
         DateTime expected = new DateTime(2013, 12, 20, 0, 0);
@@ -422,6 +482,7 @@ public class MeetupTest {
422 482
         assertThat(meetup.day(FRIDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
423 483
     }
424 484
 
485
+    @Ignore
425 486
     @Test
426 487
     public void test_third_saturday_of_january_2013() {
427 488
         DateTime expected = new DateTime(2013, 1, 19, 0, 0);
@@ -429,6 +490,7 @@ public class MeetupTest {
429 490
         assertThat(meetup.day(SATURDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
430 491
     }
431 492
 
493
+    @Ignore
432 494
     @Test
433 495
     public void test_third_saturday_of_february_2013() {
434 496
         DateTime expected = new DateTime(2013, 2, 16, 0, 0);
@@ -436,6 +498,7 @@ public class MeetupTest {
436 498
         assertThat(meetup.day(SATURDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
437 499
     }
438 500
 
501
+    @Ignore
439 502
     @Test
440 503
     public void test_third_sunday_of_march_2013() {
441 504
         DateTime expected = new DateTime(2013, 3, 17, 0, 0);
@@ -443,6 +506,7 @@ public class MeetupTest {
443 506
         assertThat(meetup.day(SUNDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
444 507
     }
445 508
 
509
+    @Ignore
446 510
     @Test
447 511
     public void test_third_sunday_of_april_2013() {
448 512
         DateTime expected = new DateTime(2013, 4, 21, 0, 0);
@@ -450,6 +514,7 @@ public class MeetupTest {
450 514
         assertThat(meetup.day(SUNDAY, MeetupSchedule.THIRD)).isEqualTo(expected);
451 515
     }
452 516
 
517
+    @Ignore
453 518
     @Test
454 519
     public void test_fourth_monday_of_march_2013() {
455 520
         DateTime expected = new DateTime(2013, 3, 25, 0, 0);
@@ -457,6 +522,7 @@ public class MeetupTest {
457 522
         assertThat(meetup.day(MONDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
458 523
     }
459 524
 
525
+    @Ignore
460 526
     @Test
461 527
     public void test_fourth_monday_of_april_2013() {
462 528
         DateTime expected = new DateTime(2013, 4, 22, 0, 0);
@@ -464,6 +530,7 @@ public class MeetupTest {
464 530
         assertThat(meetup.day(MONDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
465 531
     }
466 532
 
533
+    @Ignore
467 534
     @Test
468 535
     public void test_fourth_tuesday_of_may_2013() {
469 536
         DateTime expected = new DateTime(2013, 5, 28, 0, 0);
@@ -471,6 +538,7 @@ public class MeetupTest {
471 538
         assertThat(meetup.day(TUESDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
472 539
     }
473 540
 
541
+    @Ignore
474 542
     @Test
475 543
     public void test_fourth_tuesday_of_june_2013() {
476 544
         DateTime expected = new DateTime(2013, 6, 25, 0, 0);
@@ -478,6 +546,7 @@ public class MeetupTest {
478 546
         assertThat(meetup.day(TUESDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
479 547
     }
480 548
 
549
+    @Ignore
481 550
     @Test
482 551
     public void test_fourth_wednesday_of_july_2013() {
483 552
         DateTime expected = new DateTime(2013, 7, 24, 0, 0);
@@ -485,6 +554,7 @@ public class MeetupTest {
485 554
         assertThat(meetup.day(WEDNESDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
486 555
     }
487 556
 
557
+    @Ignore
488 558
     @Test
489 559
     public void test_fourth_wednesday_of_august_2013() {
490 560
         DateTime expected = new DateTime(2013, 8, 28, 0, 0);
@@ -492,6 +562,7 @@ public class MeetupTest {
492 562
         assertThat(meetup.day(WEDNESDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
493 563
     }
494 564
 
565
+    @Ignore
495 566
     @Test
496 567
     public void test_fourth_thursday_of_september_2013() {
497 568
         DateTime expected = new DateTime(2013, 9, 26, 0, 0);
@@ -499,6 +570,7 @@ public class MeetupTest {
499 570
         assertThat(meetup.day(THURSDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
500 571
     }
501 572
 
573
+    @Ignore
502 574
     @Test
503 575
     public void test_fourth_thursday_of_october_2013() {
504 576
         DateTime expected = new DateTime(2013, 10, 24, 0, 0);
@@ -506,6 +578,7 @@ public class MeetupTest {
506 578
         assertThat(meetup.day(THURSDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
507 579
     }
508 580
 
581
+    @Ignore
509 582
     @Test
510 583
     public void test_fourth_friday_of_november_2013() {
511 584
         DateTime expected = new DateTime(2013, 11, 22, 0, 0);
@@ -513,6 +586,7 @@ public class MeetupTest {
513 586
         assertThat(meetup.day(FRIDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
514 587
     }
515 588
 
589
+    @Ignore
516 590
     @Test
517 591
     public void test_fourth_friday_of_december_2013() {
518 592
         DateTime expected = new DateTime(2013, 12, 27, 0, 0);
@@ -520,6 +594,7 @@ public class MeetupTest {
520 594
         assertThat(meetup.day(FRIDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
521 595
     }
522 596
 
597
+    @Ignore
523 598
     @Test
524 599
     public void test_fourth_saturday_of_january_2013() {
525 600
         DateTime expected = new DateTime(2013, 1, 26, 0, 0);
@@ -527,6 +602,7 @@ public class MeetupTest {
527 602
         assertThat(meetup.day(SATURDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
528 603
     }
529 604
 
605
+    @Ignore
530 606
     @Test
531 607
     public void test_fourth_saturday_of_february_2013() {
532 608
         DateTime expected = new DateTime(2013, 2, 23, 0, 0);
@@ -534,6 +610,7 @@ public class MeetupTest {
534 610
         assertThat(meetup.day(SATURDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
535 611
     }
536 612
 
613
+    @Ignore
537 614
     @Test
538 615
     public void test_fourth_sunday_of_march_2013() {
539 616
         DateTime expected = new DateTime(2013, 3, 24, 0, 0);
@@ -541,6 +618,7 @@ public class MeetupTest {
541 618
         assertThat(meetup.day(SUNDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
542 619
     }
543 620
 
621
+    @Ignore
544 622
     @Test
545 623
     public void test_fourth_sunday_of_april_2013() {
546 624
         DateTime expected = new DateTime(2013, 4, 28, 0, 0);
@@ -548,6 +626,7 @@ public class MeetupTest {
548 626
         assertThat(meetup.day(SUNDAY, MeetupSchedule.FOURTH)).isEqualTo(expected);
549 627
     }
550 628
 
629
+    @Ignore
551 630
     @Test
552 631
     public void test_last_monday_of_march_2013() {
553 632
         DateTime expected = new DateTime(2013, 3, 25, 0, 0);
@@ -555,6 +634,7 @@ public class MeetupTest {
555 634
         assertThat(meetup.day(MONDAY, MeetupSchedule.LAST)).isEqualTo(expected);
556 635
     }
557 636
 
637
+    @Ignore
558 638
     @Test
559 639
     public void test_last_monday_of_april_2013() {
560 640
         DateTime expected = new DateTime(2013, 4, 29, 0, 0);
@@ -562,6 +642,7 @@ public class MeetupTest {
562 642
         assertThat(meetup.day(MONDAY, MeetupSchedule.LAST)).isEqualTo(expected);
563 643
     }
564 644
 
645
+    @Ignore
565 646
     @Test
566 647
     public void test_last_tuesday_of_may_2013() {
567 648
         DateTime expected = new DateTime(2013, 5, 28, 0, 0);
@@ -569,6 +650,7 @@ public class MeetupTest {
569 650
         assertThat(meetup.day(TUESDAY, MeetupSchedule.LAST)).isEqualTo(expected);
570 651
     }
571 652
 
653
+    @Ignore
572 654
     @Test
573 655
     public void test_last_tuesday_of_june_2013() {
574 656
         DateTime expected = new DateTime(2013, 6, 25, 0, 0);
@@ -576,6 +658,7 @@ public class MeetupTest {
576 658
         assertThat(meetup.day(TUESDAY, MeetupSchedule.LAST)).isEqualTo(expected);
577 659
     }
578 660
 
661
+    @Ignore
579 662
     @Test
580 663
     public void test_last_wednesday_of_july_2013() {
581 664
         DateTime expected = new DateTime(2013, 7, 31, 0, 0);
@@ -583,6 +666,7 @@ public class MeetupTest {
583 666
         assertThat(meetup.day(WEDNESDAY, MeetupSchedule.LAST)).isEqualTo(expected);
584 667
     }
585 668
 
669
+    @Ignore
586 670
     @Test
587 671
     public void test_last_wednesday_of_august_2013() {
588 672
         DateTime expected = new DateTime(2013, 8, 28, 0, 0);
@@ -590,6 +674,7 @@ public class MeetupTest {
590 674
         assertThat(meetup.day(WEDNESDAY, MeetupSchedule.LAST)).isEqualTo(expected);
591 675
     }
592 676
 
677
+    @Ignore
593 678
     @Test
594 679
     public void test_last_thursday_of_september_2013() {
595 680
         DateTime expected = new DateTime(2013, 9, 26, 0, 0);
@@ -597,6 +682,7 @@ public class MeetupTest {
597 682
         assertThat(meetup.day(THURSDAY, MeetupSchedule.LAST)).isEqualTo(expected);
598 683
     }
599 684
 
685
+    @Ignore
600 686
     @Test
601 687
     public void test_last_thursday_of_october_2013() {
602 688
         DateTime expected = new DateTime(2013, 10, 31, 0, 0);
@@ -604,6 +690,7 @@ public class MeetupTest {
604 690
         assertThat(meetup.day(THURSDAY, MeetupSchedule.LAST)).isEqualTo(expected);
605 691
     }
606 692
 
693
+    @Ignore
607 694
     @Test
608 695
     public void test_last_friday_of_november_2013() {
609 696
         DateTime expected = new DateTime(2013, 11, 29, 0, 0);
@@ -611,6 +698,7 @@ public class MeetupTest {
611 698
         assertThat(meetup.day(FRIDAY, MeetupSchedule.LAST)).isEqualTo(expected);
612 699
     }
613 700
 
701
+    @Ignore
614 702
     @Test
615 703
     public void test_last_friday_of_december_2013() {
616 704
         DateTime expected = new DateTime(2013, 12, 27, 0, 0);
@@ -618,6 +706,7 @@ public class MeetupTest {
618 706
         assertThat(meetup.day(FRIDAY, MeetupSchedule.LAST)).isEqualTo(expected);
619 707
     }
620 708
 
709
+    @Ignore
621 710
     @Test
622 711
     public void test_last_saturday_of_january_2013() {
623 712
         DateTime expected = new DateTime(2013, 1, 26, 0, 0);
@@ -625,6 +714,7 @@ public class MeetupTest {
625 714
         assertThat(meetup.day(SATURDAY, MeetupSchedule.LAST)).isEqualTo(expected);
626 715
     }
627 716
 
717
+    @Ignore
628 718
     @Test
629 719
     public void test_last_saturday_of_february_2013() {
630 720
         DateTime expected = new DateTime(2013, 2, 23, 0, 0);
@@ -632,6 +722,7 @@ public class MeetupTest {
632 722
         assertThat(meetup.day(SATURDAY, MeetupSchedule.LAST)).isEqualTo(expected);
633 723
     }
634 724
 
725
+    @Ignore
635 726
     @Test
636 727
     public void test_last_sunday_of_march_2013() {
637 728
         DateTime expected = new DateTime(2013, 3, 31, 0, 0);
@@ -639,6 +730,7 @@ public class MeetupTest {
639 730
         assertThat(meetup.day(SUNDAY, MeetupSchedule.LAST)).isEqualTo(expected);
640 731
     }
641 732
 
733
+    @Ignore
642 734
     @Test
643 735
     public void test_last_sunday_of_april_2013() {
644 736
         DateTime expected = new DateTime(2013, 4, 28, 0, 0);

+ 6
- 0
exercises/nth-prime/build.gradle Прегледај датотеку

@@ -10,3 +10,9 @@ dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
   testCompile "org.assertj:assertj-core:3.2.0"
12 12
 }
13
+test {
14
+  testLogging {
15
+    exceptionFormat = 'full'
16
+    events = ["passed", "failed", "skipped"]
17
+  }
18
+}

+ 6
- 0
exercises/nth-prime/src/test/java/PrimeTest.java Прегледај датотеку

@@ -1,28 +1,34 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import static org.assertj.core.api.Assertions.assertThat;
4 5
 
5 6
 public class PrimeTest {
7
+
6 8
     @Test
7 9
     public void testFirstPrime() {
8 10
         assertThat(Prime.nth(1)).isEqualTo(2);
9 11
     }
10 12
 
13
+    @Ignore
11 14
     @Test
12 15
     public void testSecondPrime() {
13 16
         assertThat(Prime.nth(2)).isEqualTo(3);
14 17
     }
15 18
 
19
+    @Ignore
16 20
     @Test
17 21
     public void testSixthPrime() {
18 22
         assertThat(Prime.nth(6)).isEqualTo(13);
19 23
     }
20 24
 
25
+    @Ignore
21 26
     @Test
22 27
     public void testBigPrime() {
23 28
         assertThat(Prime.nth(10001)).isEqualTo(104743);
24 29
     }
25 30
 
31
+    @Ignore
26 32
     @Test(expected = IllegalArgumentException.class)
27 33
     public void testUndefinedPrime() {
28 34
         Prime.nth(0);

+ 6
- 0
exercises/nucleotide-count/build.gradle Прегледај датотеку

@@ -11,3 +11,9 @@ dependencies {
11 11
   testCompile "org.assertj:assertj-core:3.2.0"
12 12
 }
13 13
 
14
+test {
15
+  testLogging {
16
+    exceptionFormat = 'full'
17
+    events = ["passed", "failed", "skipped"]
18
+  }
19
+}

+ 19
- 9
exercises/nucleotide-count/src/test/java/NucleotideTest.java Прегледај датотеку

@@ -2,15 +2,18 @@ import static org.assertj.core.api.Assertions.assertThat;
2 2
 import static org.assertj.core.api.Assertions.entry;
3 3
 
4 4
 import org.junit.Test;
5
+import org.junit.Ignore;
5 6
 
6 7
 public class NucleotideTest {
7
-  @Test
8
+
9
+    @Test
8 10
   public void testEmptyDnaStringHasNoAdenosine() {
9 11
     DNA dna = new DNA("");
10 12
     assertThat(dna.count('A')).isEqualTo(0);
11 13
   }
12 14
 
13
-  @Test
15
+  @Ignore
16
+    @Test
14 17
   public void testEmptyDnaStringHasNoNucleotides() {
15 18
     DNA dna = new DNA("");
16 19
     assertThat(dna.nucleotideCounts()).hasSize(4).contains(
@@ -21,13 +24,15 @@ public class NucleotideTest {
21 24
     );
22 25
   }
23 26
 
24
-  @Test
27
+  @Ignore
28
+    @Test
25 29
   public void testRepetitiveCytidineGetsCounted() {
26 30
     DNA dna = new DNA("CCCCC");
27 31
     assertThat(dna.count('C')).isEqualTo(5);
28 32
   }
29 33
 
30
-  @Test
34
+  @Ignore
35
+    @Test
31 36
   public void testRepetitiveSequenceWithOnlyGuanosine() {
32 37
     DNA dna = new DNA("GGGGGGGG");
33 38
     assertThat(dna.nucleotideCounts()).hasSize(4).contains(
@@ -38,20 +43,23 @@ public class NucleotideTest {
38 43
     );
39 44
   }
40 45
 
41
-  @Test
46
+  @Ignore
47
+    @Test
42 48
   public void testCountsOnlyThymidine() {
43 49
     DNA dna = new DNA("GGGGGTAACCCGG");
44 50
     assertThat(dna.count('T')).isEqualTo(1);
45 51
   }
46 52
 
47
-  @Test
53
+  @Ignore
54
+    @Test
48 55
   public void testCountsANucleotideOnlyOnce() {
49 56
     DNA dna = new DNA("CGATTGGG");
50 57
     dna.count('T');
51 58
     assertThat(dna.count('T')).isEqualTo(2);
52 59
   }
53 60
 
54
-  @Test
61
+  @Ignore
62
+    @Test
55 63
   public void testDnaCountsDoNotChangeAfterCountingAdenosine() {
56 64
     DNA dna = new DNA("GATTACA");
57 65
     dna.count('A');
@@ -63,13 +71,15 @@ public class NucleotideTest {
63 71
     );
64 72
   }
65 73
 
66
-  @Test(expected = IllegalArgumentException.class)
74
+  @Ignore
75
+    @Test(expected = IllegalArgumentException.class)
67 76
   public void testValidatesNucleotides() {
68 77
     DNA dna = new DNA("GACT");
69 78
     dna.count('X');
70 79
   }
71 80
 
72
-  @Test
81
+  @Ignore
82
+    @Test
73 83
   public void testCountsAllNucleotides() {
74 84
     String s = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC";
75 85
     DNA dna = new DNA(s);

+ 6
- 0
exercises/octal/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 2
- 0
exercises/octal/src/test/java/OctalTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 import org.junit.runner.RunWith;
3 4
 import org.junit.runners.Parameterized;
4 5
 
@@ -38,6 +39,7 @@ public class OctalTest {
38 39
         this.expectedOutput = expectedOutput;
39 40
     }
40 41
 
42
+
41 43
     @Test
42 44
     public void test() {
43 45
         Octal octal = new Octal(input);

+ 6
- 0
exercises/pangram/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 6
- 0
exercises/pangram/src/test/java/PangramTest.java Прегледај датотеку

@@ -1,30 +1,36 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import static org.junit.Assert.assertTrue;
4 5
 import static org.junit.Assert.assertFalse;
5 6
 
6 7
 public class PangramTest {
7 8
 
9
+
8 10
     @Test
9 11
     public void emptySentence() {
10 12
         assertFalse(Pangrams.isPangram(""));
11 13
     }
12 14
 
15
+    @Ignore
13 16
     @Test
14 17
     public void testLowercasePangram() {
15 18
         assertTrue(Pangrams.isPangram("the quick brown fox jumps over the lazy dog"));
16 19
     }
17 20
 
21
+    @Ignore
18 22
     @Test
19 23
     public void missingCharacterX() {
20 24
         assertFalse(Pangrams.isPangram("a quick movement of the enemy will jeopardize five gunboats"));
21 25
     }
22 26
 
27
+    @Ignore
23 28
     @Test
24 29
     public void mixedCaseAndPunctuation() {
25 30
         assertTrue(Pangrams.isPangram("\"Five quacking Zephyrs jolt my wax bed.\""));
26 31
     }
27 32
 
33
+    @Ignore
28 34
     @Test
29 35
     public void nonAsciiCharacters() {
30 36
         assertTrue(Pangrams.isPangram("Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich."));

+ 6
- 0
exercises/pascals-triangle/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 7
- 0
exercises/pascals-triangle/src/test/java/PascalsTriangleTest.java Прегледај датотеку

@@ -1,10 +1,12 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import static org.junit.Assert.assertArrayEquals;
4 5
 import static org.junit.Assert.assertEquals;
5 6
 
6 7
 public class PascalsTriangleTest {
7 8
 
9
+
8 10
     @Test
9 11
     public void testTriangleWithFourRows() {
10 12
         int[][] expectedOutput = new int[][]{
@@ -17,6 +19,7 @@ public class PascalsTriangleTest {
17 19
         assertArrayEquals(expectedOutput, PascalsTriangle.computeTriangle(4));
18 20
     }
19 21
 
22
+    @Ignore
20 23
     @Test
21 24
     public void testTriangleWithSixRows() {
22 25
         int[][] expectedOutput = new int[][]{
@@ -31,6 +34,7 @@ public class PascalsTriangleTest {
31 34
         assertArrayEquals(expectedOutput, PascalsTriangle.computeTriangle(6));
32 35
     }
33 36
 
37
+    @Ignore
34 38
     @Test
35 39
     public void testExpectEmptyTriangle() {
36 40
         int[][] expectedOutput = new int[][]{
@@ -40,6 +44,7 @@ public class PascalsTriangleTest {
40 44
         assertArrayEquals(expectedOutput, PascalsTriangle.computeTriangle(0));
41 45
     }
42 46
 
47
+    @Ignore
43 48
     @Test
44 49
     public void testValidInput() {
45 50
         int[][] input = new int[][]{
@@ -53,6 +58,7 @@ public class PascalsTriangleTest {
53 58
         assertEquals(true, PascalsTriangle.isTriangle(input));
54 59
     }
55 60
 
61
+    @Ignore
56 62
     @Test
57 63
     public void testInvalidInput() {
58 64
         int[][] input = new int[][]{
@@ -65,6 +71,7 @@ public class PascalsTriangleTest {
65 71
         assertEquals(false, PascalsTriangle.isTriangle(input));
66 72
     }
67 73
 
74
+    @Ignore
68 75
     @Test(expected = IllegalArgumentException.class)
69 76
     public void testValidatesNotNegativeRows() {
70 77
         PascalsTriangle.computeTriangle(-1);

+ 6
- 0
exercises/phone-number/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 9
- 0
exercises/phone-number/src/test/java/PhoneNumberTest.java Прегледај датотеку

@@ -1,9 +1,11 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import static org.junit.Assert.*;
4 5
 
5 6
 public class PhoneNumberTest {
6 7
 
8
+
7 9
     @Test
8 10
     public void cleansNumber() {
9 11
         final String expectedNumber = "1234567890";
@@ -14,6 +16,7 @@ public class PhoneNumberTest {
14 16
         );
15 17
     }
16 18
 
19
+    @Ignore
17 20
     @Test
18 21
     public void cleansNumberWithDots() {
19 22
         final String expectedNumber = "1234567890";
@@ -24,6 +27,7 @@ public class PhoneNumberTest {
24 27
         );
25 28
     }
26 29
 
30
+    @Ignore
27 31
     @Test
28 32
     public void validWhen11DigitsAndFirstIs1() {
29 33
         final String expectedNumber = "1234567890";
@@ -34,6 +38,7 @@ public class PhoneNumberTest {
34 38
         );
35 39
     }
36 40
 
41
+    @Ignore
37 42
     @Test
38 43
     public void invalidWhenOnly11Digits() {
39 44
         final String expectedNumber = "0000000000";
@@ -44,6 +49,7 @@ public class PhoneNumberTest {
44 49
         );
45 50
     }
46 51
 
52
+    @Ignore
47 53
     @Test
48 54
     public void invalidWhen9Digits() {
49 55
         final String expectedNumber = "0000000000";
@@ -54,6 +60,7 @@ public class PhoneNumberTest {
54 60
         );
55 61
     }
56 62
 
63
+    @Ignore
57 64
     @Test
58 65
     public void areaCode() {
59 66
         final String expectedAreaCode = "123";
@@ -64,6 +71,7 @@ public class PhoneNumberTest {
64 71
         );
65 72
     }
66 73
 
74
+    @Ignore
67 75
     @Test
68 76
     public void prettyPrint() {
69 77
         final String expectedPrettyNumber = "(123) 456-7890";
@@ -74,6 +82,7 @@ public class PhoneNumberTest {
74 82
         );
75 83
     }
76 84
 
85
+    @Ignore
77 86
     @Test
78 87
     public void prettyPrintWithFullUSPhoneNumber() {
79 88
         final String expectedPrettyNumber = "(123) 456-7890";

+ 6
- 0
exercises/pig-latin/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 2
- 0
exercises/pig-latin/src/test/java/PigLatinTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 import org.junit.runner.RunWith;
3 4
 import org.junit.runners.Parameterized;
4 5
 
@@ -63,6 +64,7 @@ public class PigLatinTest {
63 64
         this.expectedOutput = expectedOutput;
64 65
     }
65 66
 
67
+
66 68
     @Test
67 69
     public void test() {
68 70
         assertEquals(expectedOutput, PigLatin.translate(input));

+ 6
- 0
exercises/prime-factors/build.gradle Прегледај датотеку

@@ -10,3 +10,9 @@ dependencies {
10 10
   testCompile "junit:junit:4.12"
11 11
 }
12 12
 
13
+test {
14
+  testLogging {
15
+    exceptionFormat = 'full'
16
+    events = ["passed", "failed", "skipped"]
17
+  }
18
+}

+ 2
- 0
exercises/prime-factors/src/test/java/PrimeFactorsTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 import org.junit.runner.RunWith;
3 4
 import org.junit.runners.Parameterized;
4 5
 import org.junit.runners.Parameterized.Parameters;
@@ -37,6 +38,7 @@ public class PrimeFactorsTest {
37 38
         this.expectedOutput = expectedOutput;
38 39
     }
39 40
 
41
+
40 42
     @Test
41 43
     public void test() {
42 44
         assertEquals(expectedOutput, PrimeFactors.getForNumber(input));

+ 6
- 0
exercises/raindrops/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 2
- 0
exercises/raindrops/src/test/java/RaindropsTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 import org.junit.runner.RunWith;
3 4
 import org.junit.runners.Parameterized;
4 5
 import org.junit.runners.Parameterized.Parameters;
@@ -50,6 +51,7 @@ public class RaindropsTest {
50 51
         this.expectedOutput = expectedOutput;
51 52
     }
52 53
 
54
+
53 55
     @Test
54 56
     public void test() {
55 57
         assertEquals(expectedOutput, Raindrops.convert(input));

+ 6
- 0
exercises/rna-transcription/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 7
- 0
exercises/rna-transcription/src/test/java/RnaTranscriptionTest.java Прегледај датотеку

@@ -1,33 +1,40 @@
1 1
 import org.junit.Assert;
2 2
 import org.junit.Test;
3
+import org.junit.Ignore;
3 4
 
4 5
 public class RnaTranscriptionTest {
5 6
 
7
+
6 8
     @Test
7 9
     public void testRnaTranscriptionOfEmptyDnaIsEmptyRna() {
8 10
         Assert.assertEquals("", RnaTranscription.ofDna(""));
9 11
     }
10 12
 
13
+    @Ignore
11 14
     @Test
12 15
     public void testRnaTranscriptionOfCytosineIsGuanine() {
13 16
         Assert.assertEquals("G", RnaTranscription.ofDna("C"));
14 17
     }
15 18
 
19
+    @Ignore
16 20
     @Test
17 21
     public void testRnaTranscriptionOfGuanineIsCytosine() {
18 22
         Assert.assertEquals("C", RnaTranscription.ofDna("G"));
19 23
     }
20 24
 
25
+    @Ignore
21 26
     @Test
22 27
     public void testRnaTranscriptionOfThymineIsAdenine() {
23 28
         Assert.assertEquals("A", RnaTranscription.ofDna("T"));
24 29
     }
25 30
 
31
+    @Ignore
26 32
     @Test
27 33
     public void testRnaTranscriptionOfAdenineIsUracil() {
28 34
         Assert.assertEquals("U", RnaTranscription.ofDna("A"));
29 35
     }
30 36
 
37
+    @Ignore
31 38
     @Test
32 39
     public void testRnaTranscription() {
33 40
         Assert.assertEquals("UGCACCAGAAUU", RnaTranscription.ofDna("ACGTGGTCTTAA"));

+ 6
- 0
exercises/robot-name/build.gradle Прегледај датотеку

@@ -10,3 +10,9 @@ dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12 12
 
13
+test {
14
+  testLogging {
15
+    exceptionFormat = 'full'
16
+    events = ["passed", "failed", "skipped"]
17
+  }
18
+}

+ 4
- 0
exercises/robot-name/src/test/java/RobotTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import static org.hamcrest.CoreMatchers.equalTo;
4 5
 import static org.hamcrest.core.Is.is;
@@ -10,16 +11,19 @@ public class RobotTest {
10 11
     private static final String EXPECTED_ROBOT_NAME_PATTERN = "[A-Z]{2}\\d{3}";
11 12
     private final Robot robot = new Robot();
12 13
 
14
+
13 15
     @Test
14 16
     public void hasName() {
15 17
         assertIsValidName(robot.getName());
16 18
     }
17 19
 
20
+    @Ignore
18 21
     @Test
19 22
     public void differentRobotsHaveDifferentNames() {
20 23
         assertThat(robot.getName(), not(equalTo(new Robot().getName())));
21 24
     }
22 25
 
26
+    @Ignore
23 27
     @Test
24 28
     public void resetName() {
25 29
         final String name = robot.getName();

+ 6
- 0
exercises/roman-numerals/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 2
- 0
exercises/roman-numerals/src/test/java/RomanNumeralsTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 import org.junit.runner.RunWith;
3 4
 import org.junit.runners.Parameterized;
4 5
 import org.junit.runners.Parameterized.Parameters;
@@ -44,6 +45,7 @@ public class RomanNumeralsTest {
44 45
         this.expectedOutput = expectedOutput;
45 46
     }
46 47
 
48
+
47 49
     @Test
48 50
     public void convertArabicNumberalToRomanNumeral() {
49 51
         RomanNumeral romanNumeral = new RomanNumeral(input);

+ 6
- 0
exercises/scrabble-score/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 2
- 0
exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 import org.junit.runner.RunWith;
3 4
 import org.junit.runners.Parameterized;
4 5
 
@@ -33,6 +34,7 @@ public class ScrabbleScoreTest {
33 34
         this.expectedOutput = expectedOutput;
34 35
     }
35 36
 
37
+
36 38
     @Test
37 39
     public void test() {
38 40
         Scrabble scrabble = new Scrabble(input);

+ 6
- 0
exercises/sieve/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 4
- 0
exercises/sieve/src/test/java/SieveTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import java.util.Arrays;
4 5
 import java.util.List;
@@ -7,6 +8,7 @@ import static org.junit.Assert.assertEquals;
7 8
 
8 9
 public class SieveTest {
9 10
 
11
+
10 12
     @Test
11 13
     public void findFirstPrime() {
12 14
         Sieve sieve = new Sieve(2);
@@ -15,6 +17,7 @@ public class SieveTest {
15 17
         assertEquals(expectedOutput, sieve.getPrimes());
16 18
     }
17 19
 
20
+    @Ignore
18 21
     @Test
19 22
     public void findPrimesUpTo10() {
20 23
         Sieve sieve = new Sieve(10);
@@ -23,6 +26,7 @@ public class SieveTest {
23 26
         assertEquals(expectedOutput, sieve.getPrimes());
24 27
     }
25 28
 
29
+    @Ignore
26 30
     @Test
27 31
     public void findPrimesUpTo1000() {
28 32
         Sieve sieve = new Sieve(1000);

+ 6
- 0
exercises/simple-cipher/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 6
- 0
exercises/simple-cipher/src/test/java/IncorrectKeyCipherTest.java Прегледај датотеку

@@ -1,27 +1,33 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 public class IncorrectKeyCipherTest {
4 5
 
6
+
5 7
     @Test(expected = IllegalArgumentException.class)
6 8
     public void cipherThrowsWithAllCapsKey() {
7 9
         new Cipher("ABCDEF");
8 10
     }
9 11
 
12
+    @Ignore
10 13
     @Test(expected = IllegalArgumentException.class)
11 14
     public void cipherThrowsWithAnyCapsKey() {
12 15
         new Cipher("abcdEFg");
13 16
     }
14 17
 
18
+    @Ignore
15 19
     @Test(expected = IllegalArgumentException.class)
16 20
     public void cipherThrowsWithNumericKey() {
17 21
         new Cipher("12345");
18 22
     }
19 23
 
24
+    @Ignore
20 25
     @Test(expected = IllegalArgumentException.class)
21 26
     public void cipherThrowsWithAnyNumericKey() {
22 27
         new Cipher("abcd345ef");
23 28
     }
24 29
 
30
+    @Ignore
25 31
     @Test(expected = IllegalArgumentException.class)
26 32
     public void cipherThrowsWithEmptyKey() {
27 33
         new Cipher("");

+ 7
- 0
exercises/simple-cipher/src/test/java/RandomKeyCipherTest.java Прегледај датотеку

@@ -1,5 +1,6 @@
1 1
 import org.junit.Before;
2 2
 import org.junit.Test;
3
+import org.junit.Ignore;
3 4
 
4 5
 import static org.junit.Assert.assertEquals;
5 6
 import static org.junit.Assert.assertTrue;
@@ -13,16 +14,19 @@ public class RandomKeyCipherTest {
13 14
         this.cipher = new Cipher();
14 15
     }
15 16
 
17
+
16 18
     @Test
17 19
     public void cipherKeyIsMadeOfLetters() {
18 20
         assertTrue(cipher.getKey().matches("[a-z]+"));
19 21
     }
20 22
 
23
+    @Ignore
21 24
     @Test
22 25
     public void defaultCipherKeyIs100Characters() {
23 26
         assertEquals(100, cipher.getKey().length());
24 27
     }
25 28
 
29
+    @Ignore
26 30
     @Test
27 31
     public void cipherKeysAreRandomlyGenerated() {
28 32
         assertTrue(!(new Cipher().getKey().equals(cipher.getKey())));
@@ -32,6 +36,7 @@ public class RandomKeyCipherTest {
32 36
      * Here we take advantage of the fact that plaintext of "aaa..." doesn't output the key. This is a critical problem
33 37
      * with shift ciphers, some characters will always output the key verbatim.
34 38
      */
39
+    @Ignore
35 40
     @Test
36 41
     public void cipherCanEncode() {
37 42
         String expectedOutput = cipher.getKey().substring(0, 10);
@@ -39,6 +44,7 @@ public class RandomKeyCipherTest {
39 44
         assertEquals(expectedOutput, cipher.encode("aaaaaaaaaa"));
40 45
     }
41 46
 
47
+    @Ignore
42 48
     @Test
43 49
     public void cipherCanDecode() {
44 50
         String expectedOutput = "aaaaaaaaaa";
@@ -46,6 +52,7 @@ public class RandomKeyCipherTest {
46 52
         assertEquals(expectedOutput, cipher.decode(cipher.getKey().substring(0, 10)));
47 53
     }
48 54
 
55
+    @Ignore
49 56
     @Test
50 57
     public void cipherIsReversible() {
51 58
         String plainText = "abcdefghij";

+ 9
- 0
exercises/simple-cipher/src/test/java/SubstitutionCipherTest.java Прегледај датотеку

@@ -1,5 +1,6 @@
1 1
 import org.junit.Before;
2 2
 import org.junit.Test;
3
+import org.junit.Ignore;
3 4
 
4 5
 import static org.junit.Assert.assertEquals;
5 6
 
@@ -13,11 +14,13 @@ public class SubstitutionCipherTest {
13 14
         this.cipher = new Cipher(KEY);
14 15
     }
15 16
 
17
+
16 18
     @Test
17 19
     public void cipherKeepsTheSubmittedKey() {
18 20
         assertEquals(KEY, cipher.getKey());
19 21
     }
20 22
 
23
+    @Ignore
21 24
     @Test
22 25
     public void cipherCanEncodeWithGivenKey() {
23 26
         String expectedOutput = "abcdefghij";
@@ -25,6 +28,7 @@ public class SubstitutionCipherTest {
25 28
         assertEquals(expectedOutput, cipher.encode("aaaaaaaaaa"));
26 29
     }
27 30
 
31
+    @Ignore
28 32
     @Test
29 33
     public void cipherCanDecodeWithGivenKey() {
30 34
         String expectedOutput = "aaaaaaaaaa";
@@ -32,6 +36,7 @@ public class SubstitutionCipherTest {
32 36
         assertEquals(expectedOutput, cipher.decode("abcdefghij"));
33 37
     }
34 38
 
39
+    @Ignore
35 40
     @Test
36 41
     public void cipherIsReversibleGivenKey() {
37 42
         String plainText = "abcdefghij";
@@ -39,6 +44,7 @@ public class SubstitutionCipherTest {
39 44
         assertEquals(plainText, cipher.decode(cipher.encode("abcdefghij")));
40 45
     }
41 46
 
47
+    @Ignore
42 48
     @Test
43 49
     public void cipherCanDoubleShiftEncode() {
44 50
         String plainText = "iamapandabear";
@@ -47,6 +53,7 @@ public class SubstitutionCipherTest {
47 53
         assertEquals(expectedOutput, new Cipher(plainText).encode(plainText));
48 54
     }
49 55
 
56
+    @Ignore
50 57
     @Test
51 58
     public void cipherCanWrapEncode() {
52 59
         String expectedOutput = "zabcdefghi";
@@ -54,6 +61,7 @@ public class SubstitutionCipherTest {
54 61
         assertEquals(expectedOutput, cipher.encode("zzzzzzzzzz"));
55 62
     }
56 63
 
64
+    @Ignore
57 65
     @Test
58 66
     public void cipherCanEncodeMessageThatIsShorterThanTheKey() {
59 67
         String expectedOutput = "abcde";
@@ -61,6 +69,7 @@ public class SubstitutionCipherTest {
61 69
         assertEquals(expectedOutput, cipher.encode("aaaaa"));
62 70
     }
63 71
 
72
+    @Ignore
64 73
     @Test
65 74
     public void cipherCanDecodeMessageThatIsShorterThanTheKey() {
66 75
         String expectedOutput = "aaaaa";

+ 6
- 0
exercises/simple-linked-list/build.gradle Прегледај датотеку

@@ -10,3 +10,9 @@ dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
   testCompile "org.assertj:assertj-core:3.2.0"
12 12
 }
13
+test {
14
+  testLogging {
15
+    exceptionFormat = 'full'
16
+    events = ["passed", "failed", "skipped"]
17
+  }
18
+}

+ 8
- 0
exercises/simple-linked-list/src/test/java/SimpleLinkedListTest.java Прегледај датотеку

@@ -2,15 +2,18 @@
2 2
 import java.util.NoSuchElementException;
3 3
 import static org.assertj.core.api.Assertions.assertThat;
4 4
 import org.junit.Test;
5
+import org.junit.Ignore;
5 6
 
6 7
 public class SimpleLinkedListTest {
7 8
 
9
+
8 10
     @Test
9 11
     public void aNewListIsEmpty() {
10 12
         SimpleLinkedList list = new SimpleLinkedList();
11 13
         assertThat(list.size()).isEqualTo(0);
12 14
     }
13 15
 
16
+    @Ignore
14 17
     @Test
15 18
     public void canCreateFromArray() {
16 19
         Integer[] values = new Integer[]{1, 2, 3};
@@ -18,12 +21,14 @@ public class SimpleLinkedListTest {
18 21
         assertThat(list.size()).isEqualTo(3);
19 22
     }
20 23
 
24
+    @Ignore
21 25
     @Test(expected = NoSuchElementException.class)
22 26
     public void popOnEmptyListWillThrow() {
23 27
         SimpleLinkedList list = new SimpleLinkedList();
24 28
         list.pop();
25 29
     }
26 30
 
31
+    @Ignore
27 32
     @Test
28 33
     public void popReturnsLastAddedElement() {
29 34
         SimpleLinkedList list = new SimpleLinkedList();
@@ -35,6 +40,7 @@ public class SimpleLinkedListTest {
35 40
         assertThat(list.size()).isEqualTo(0);
36 41
     }
37 42
 
43
+    @Ignore
38 44
     @Test
39 45
     public void reverseReversesList() {
40 46
         SimpleLinkedList list = new SimpleLinkedList();
@@ -51,6 +57,7 @@ public class SimpleLinkedListTest {
51 57
         assertThat(list.pop()).isEqualTo(5);
52 58
     }
53 59
 
60
+    @Ignore
54 61
     @Test
55 62
     public void canReturnListAsArray() {
56 63
         SimpleLinkedList list = new SimpleLinkedList();
@@ -63,6 +70,7 @@ public class SimpleLinkedListTest {
63 70
         assertThat(list.asArray(Integer.class)).containsExactly(expected);
64 71
     }
65 72
 
73
+    @Ignore
66 74
     @Test
67 75
     public void canReturnEmptyListAsEmptyArray() {
68 76
         SimpleLinkedList list = new SimpleLinkedList();

+ 6
- 0
exercises/space-age/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 10
- 0
exercises/space-age/src/test/java/SpaceAgeTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import static org.junit.Assert.assertEquals;
4 5
 
@@ -6,6 +7,7 @@ public class SpaceAgeTest {
6 7
 
7 8
     private static final double MAXIMUM_DELTA = 1E-02;
8 9
 
10
+
9 11
     @Test
10 12
     public void ageInSeconds() {
11 13
         SpaceAge age = new SpaceAge(1000000);
@@ -13,6 +15,7 @@ public class SpaceAgeTest {
13 15
         assertEquals(1000000, age.getSeconds(), MAXIMUM_DELTA);
14 16
     }
15 17
 
18
+    @Ignore
16 19
     @Test
17 20
     public void ageOnEarth() {
18 21
         SpaceAge age = new SpaceAge(1000000000);
@@ -20,6 +23,7 @@ public class SpaceAgeTest {
20 23
         assertEquals(31.69, age.onEarth(), MAXIMUM_DELTA);
21 24
     }
22 25
 
26
+    @Ignore
23 27
     @Test
24 28
     public void ageOnMercury() {
25 29
         SpaceAge age = new SpaceAge(2134835688);
@@ -28,6 +32,7 @@ public class SpaceAgeTest {
28 32
         assertEquals(280.88, age.onMercury(), MAXIMUM_DELTA);
29 33
     }
30 34
 
35
+    @Ignore
31 36
     @Test
32 37
     public void ageOnVenus() {
33 38
         SpaceAge age = new SpaceAge(189839836);
@@ -36,6 +41,7 @@ public class SpaceAgeTest {
36 41
         assertEquals(9.78, age.onVenus(), MAXIMUM_DELTA);
37 42
     }
38 43
 
44
+    @Ignore
39 45
     @Test
40 46
     public void ageOnMars() {
41 47
         SpaceAge age = new SpaceAge(2329871239L);
@@ -44,6 +50,7 @@ public class SpaceAgeTest {
44 50
         assertEquals(39.25, age.onMars(), MAXIMUM_DELTA);
45 51
     }
46 52
 
53
+    @Ignore
47 54
     @Test
48 55
     public void ageOnJupiter() {
49 56
         SpaceAge age = new SpaceAge(901876382);
@@ -52,6 +59,7 @@ public class SpaceAgeTest {
52 59
         assertEquals(2.41, age.onJupiter(), MAXIMUM_DELTA);
53 60
     }
54 61
 
62
+    @Ignore
55 63
     @Test
56 64
     public void ageOnSaturn() {
57 65
         SpaceAge age = new SpaceAge(3000000000L);
@@ -60,6 +68,7 @@ public class SpaceAgeTest {
60 68
         assertEquals(3.23, age.onSaturn(), MAXIMUM_DELTA);
61 69
     }
62 70
 
71
+    @Ignore
63 72
     @Test
64 73
     public void ageOnUranus() {
65 74
         SpaceAge age = new SpaceAge(3210123456L);
@@ -68,6 +77,7 @@ public class SpaceAgeTest {
68 77
         assertEquals(1.21, age.onUranus(), MAXIMUM_DELTA);
69 78
     }
70 79
 
80
+    @Ignore
71 81
     @Test
72 82
     public void ageOnNeptune() {
73 83
         SpaceAge age = new SpaceAge(8210123456L);

+ 6
- 0
exercises/strain/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 13
- 0
exercises/strain/src/test/java/StrainTest.java Прегледај датотеку

@@ -1,5 +1,6 @@
1 1
 import org.junit.Assert;
2 2
 import org.junit.Test;
3
+import org.junit.Ignore;
3 4
 
4 5
 import java.util.Arrays;
5 6
 import java.util.LinkedList;
@@ -7,6 +8,7 @@ import java.util.List;
7 8
 
8 9
 public class StrainTest {
9 10
 
11
+
10 12
     @Test
11 13
     public void emptyKeep() {
12 14
         List<Integer> input = new LinkedList<>();
@@ -14,6 +16,7 @@ public class StrainTest {
14 16
         Assert.assertEquals(expectedOutput, Strain.keep(input, x -> x < 10));
15 17
     }
16 18
 
19
+    @Ignore
17 20
     @Test
18 21
     public void keepEverything() {
19 22
         List<Integer> input = Arrays.asList(1, 2, 3);
@@ -21,6 +24,7 @@ public class StrainTest {
21 24
         Assert.assertEquals(expectedOutput, Strain.keep(input, x -> x < 10));
22 25
     }
23 26
 
27
+    @Ignore
24 28
     @Test
25 29
     public void keepFirstAndLast() {
26 30
         List<Integer> input = Arrays.asList(1, 2, 3);
@@ -28,6 +32,7 @@ public class StrainTest {
28 32
         Assert.assertEquals(expectedOutput, Strain.keep(input, x -> x % 2 != 0));
29 33
     }
30 34
 
35
+    @Ignore
31 36
     @Test
32 37
     public void keepNeitherFirstNorLast() {
33 38
         List<Integer> input = Arrays.asList(1, 2, 3, 4, 5);
@@ -35,6 +40,7 @@ public class StrainTest {
35 40
         Assert.assertEquals(expectedOutput, Strain.keep(input, x -> x % 2 == 0));
36 41
     }
37 42
 
43
+    @Ignore
38 44
     @Test
39 45
     public void KeepStrings() {
40 46
         List<String> words = Arrays
@@ -44,6 +50,7 @@ public class StrainTest {
44 50
                 Strain.keep(words, x -> x.startsWith("z")));
45 51
     }
46 52
 
53
+    @Ignore
47 54
     @Test
48 55
     public void KeepArrays() {
49 56
         List<List<Integer>> actual = Arrays.asList(
@@ -63,6 +70,7 @@ public class StrainTest {
63 70
                 Strain.keep(actual, col -> col.contains(5)));
64 71
     }
65 72
 
73
+    @Ignore
66 74
     @Test
67 75
     public void emptyDiscard() {
68 76
         List<Integer> input = new LinkedList<>();
@@ -70,6 +78,7 @@ public class StrainTest {
70 78
         Assert.assertEquals(expectedOutput, Strain.discard(input, x -> x < 10));
71 79
     }
72 80
 
81
+    @Ignore
73 82
     @Test
74 83
     public void discardNothing() {
75 84
         List<Integer> input = Arrays.asList(1, 2, 3);
@@ -77,6 +86,7 @@ public class StrainTest {
77 86
         Assert.assertEquals(expectedOutput, Strain.discard(input, x -> x > 10));
78 87
     }
79 88
 
89
+    @Ignore
80 90
     @Test
81 91
     public void discardFirstAndLast() {
82 92
         List<Integer> input = Arrays.asList(1, 2, 3);
@@ -85,6 +95,7 @@ public class StrainTest {
85 95
 
86 96
     }
87 97
 
98
+    @Ignore
88 99
     @Test
89 100
     public void discardNeitherFirstNorLast() {
90 101
         List<Integer> input = Arrays.asList(1, 2, 3, 4, 5);
@@ -92,6 +103,7 @@ public class StrainTest {
92 103
         Assert.assertEquals(expectedOutput, Strain.discard(input, x -> x % 2 == 0));
93 104
     }
94 105
 
106
+    @Ignore
95 107
     @Test
96 108
     public void discardStrings() {
97 109
         List<String> words = Arrays
@@ -101,6 +113,7 @@ public class StrainTest {
101 113
                 Strain.discard(words, x -> x.startsWith("z")));
102 114
     }
103 115
 
116
+    @Ignore
104 117
     @Test
105 118
     public void discardArrays() {
106 119
         List<List<Integer>> actual = Arrays.asList(

+ 6
- 0
exercises/triangle/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 16
- 0
exercises/triangle/src/test/java/TriangleTest.java Прегледај датотеку

@@ -1,9 +1,11 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import static org.junit.Assert.assertEquals;
4 5
 
5 6
 public class TriangleTest {
6 7
 
8
+
7 9
     @Test
8 10
     public void equilateralTriangleHaveEqualSides() throws Exception {
9 11
         Triangle triangle = new Triangle(2, 2, 2);
@@ -11,6 +13,7 @@ public class TriangleTest {
11 13
         assertEquals(TriangleKind.EQUILATERAL, triangle.getKind());
12 14
     }
13 15
 
16
+    @Ignore
14 17
     @Test
15 18
     public void largerEquilateralTrianglesAlsoHaveEqualSides() throws Exception {
16 19
         Triangle triangle = new Triangle(10, 10, 10);
@@ -18,6 +21,7 @@ public class TriangleTest {
18 21
         assertEquals(TriangleKind.EQUILATERAL, triangle.getKind());
19 22
     }
20 23
 
24
+    @Ignore
21 25
     @Test
22 26
     public void isoscelesTrianglesHaveLastTwoSidesEqual() throws Exception {
23 27
         Triangle triangle = new Triangle(3, 4, 4);
@@ -25,6 +29,7 @@ public class TriangleTest {
25 29
         assertEquals(TriangleKind.ISOSCELES, triangle.getKind());
26 30
     }
27 31
 
32
+    @Ignore
28 33
     @Test
29 34
     public void isoscelesTrianglesHaveFirstAndLastSidesEqual() throws Exception {
30 35
         Triangle triangle = new Triangle(4, 3, 4);
@@ -32,6 +37,7 @@ public class TriangleTest {
32 37
         assertEquals(TriangleKind.ISOSCELES, triangle.getKind());
33 38
     }
34 39
 
40
+    @Ignore
35 41
     @Test
36 42
     public void isoscelesTrianglesHaveTwoFirstSidesEqual() throws Exception {
37 43
         Triangle triangle = new Triangle(4, 4, 3);
@@ -39,6 +45,7 @@ public class TriangleTest {
39 45
         assertEquals(TriangleKind.ISOSCELES, triangle.getKind());
40 46
     }
41 47
 
48
+    @Ignore
42 49
     @Test
43 50
     public void isoscelesTrianglesHaveInFactExactlyTwoSidesEqual() throws Exception {
44 51
         Triangle triangle = new Triangle(10, 10, 2);
@@ -46,6 +53,7 @@ public class TriangleTest {
46 53
         assertEquals(TriangleKind.ISOSCELES, triangle.getKind());
47 54
     }
48 55
 
56
+    @Ignore
49 57
     @Test
50 58
     public void scaleneTrianglesHaveNoEqualSides() throws Exception {
51 59
         Triangle triangle = new Triangle(3, 4, 5);
@@ -53,6 +61,7 @@ public class TriangleTest {
53 61
         assertEquals(TriangleKind.SCALENE, triangle.getKind());
54 62
     }
55 63
 
64
+    @Ignore
56 65
     @Test
57 66
     public void scaleneTrianglesHaveNoEqualSidesAtLargerScaleEither() throws Exception {
58 67
         Triangle triangle = new Triangle(10, 11, 12);
@@ -60,6 +69,7 @@ public class TriangleTest {
60 69
         assertEquals(TriangleKind.SCALENE, triangle.getKind());
61 70
     }
62 71
 
72
+    @Ignore
63 73
     @Test
64 74
     public void scaleneTrianglesHaveNoEqualSidesInDescendingOrderEither() throws Exception {
65 75
         Triangle triangle = new Triangle(5, 4, 2);
@@ -67,6 +77,7 @@ public class TriangleTest {
67 77
         assertEquals(TriangleKind.SCALENE, triangle.getKind());
68 78
     }
69 79
 
80
+    @Ignore
70 81
     @Test
71 82
     public void verySmallTrianglesAreLegal() throws Exception {
72 83
         Triangle triangle = new Triangle(0.4, 0.6, 0.3);
@@ -74,26 +85,31 @@ public class TriangleTest {
74 85
         assertEquals(TriangleKind.SCALENE, triangle.getKind());
75 86
     }
76 87
 
88
+    @Ignore
77 89
     @Test(expected = TriangleException.class)
78 90
     public void trianglesWithNoSizeAreIllegal() throws Exception {
79 91
         new Triangle(0, 0, 0);
80 92
     }
81 93
 
94
+    @Ignore
82 95
     @Test(expected = TriangleException.class)
83 96
     public void trianglesWithNegativeSidesAreIllegal() throws Exception {
84 97
         new Triangle(3, 4, -5);
85 98
     }
86 99
 
100
+    @Ignore
87 101
     @Test(expected = TriangleException.class)
88 102
     public void trianglesViolatingTriangleInequalityAreIllegal() throws Exception {
89 103
         new Triangle(1, 1, 3);
90 104
     }
91 105
 
106
+    @Ignore
92 107
     @Test(expected = TriangleException.class)
93 108
     public void trianglesViolatingTriangleInequalityAreIllegal2() throws Exception {
94 109
         new Triangle(2, 4, 2);
95 110
     }
96 111
 
112
+    @Ignore
97 113
     @Test(expected = TriangleException.class)
98 114
     public void trianglesViolatingTriangleInequalityAreIllegal3() throws Exception {
99 115
         new Triangle(7, 3, 2);

+ 6
- 0
exercises/trinary/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 5
- 0
exercises/trinary/src/test/java/TrinaryTest.java Прегледај датотеку

@@ -1,23 +1,28 @@
1 1
 import static org.junit.Assert.assertEquals;
2 2
 
3 3
 import org.junit.Test;
4
+import org.junit.Ignore;
4 5
 
5 6
 public class TrinaryTest {
7
+
6 8
     @Test
7 9
     public void testNonTrinaryCharacterIsZero() {
8 10
         assertEquals(0, Trinary.toDecimal("-"));
9 11
     }
10 12
 
13
+    @Ignore
11 14
     @Test
12 15
     public void testNonTrinaryNumberIsZero() {
13 16
         assertEquals(0, Trinary.toDecimal("3"));
14 17
     }
15 18
 
19
+    @Ignore
16 20
     @Test
17 21
     public void testTrinaryWithNonTrinaryIsZero() {
18 22
         assertEquals(0, Trinary.toDecimal("102-12"));
19 23
     }
20 24
 
25
+    @Ignore
21 26
     @Test
22 27
     public void testTrinary() {
23 28
         assertEquals(302, Trinary.toDecimal("102012"));

+ 6
- 0
exercises/word-count/build.gradle Прегледај датотеку

@@ -9,3 +9,9 @@ repositories {
9 9
 dependencies {
10 10
   testCompile "junit:junit:4.10"
11 11
 }
12
+test {
13
+  testLogging {
14
+    exceptionFormat = 'full'
15
+    events = ["passed", "failed", "skipped"]
16
+  }
17
+}

+ 7
- 0
exercises/word-count/src/test/java/WordCountTest.java Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 import org.junit.Test;
2
+import org.junit.Ignore;
2 3
 
3 4
 import java.lang.Integer;
4 5
 import java.lang.String;
@@ -11,6 +12,7 @@ public class WordCountTest {
11 12
 
12 13
     private final WordCount wordCount = new WordCount();
13 14
 
15
+
14 16
     @Test
15 17
     public void countOneWord() {
16 18
         Map<String, Integer> actualWordCount = new HashMap<String, Integer>();
@@ -23,6 +25,7 @@ public class WordCountTest {
23 25
         );
24 26
     }
25 27
 
28
+    @Ignore
26 29
     @Test
27 30
     public void countOneOfEach() {
28 31
         Map<String, Integer> actualWordCount = new HashMap<String, Integer>();
@@ -37,6 +40,7 @@ public class WordCountTest {
37 40
         );
38 41
     }
39 42
 
43
+    @Ignore
40 44
     @Test
41 45
     public void countMultipleOccurences() {
42 46
         Map<String, Integer> actualWordCount = new HashMap<String, Integer>();
@@ -53,6 +57,7 @@ public class WordCountTest {
53 57
         );
54 58
     }
55 59
 
60
+    @Ignore
56 61
     @Test
57 62
     public void ignorePunctuation() {
58 63
         Map<String, Integer> actualWordCount = new HashMap<String, Integer>();
@@ -70,6 +75,7 @@ public class WordCountTest {
70 75
 
71 76
     }
72 77
 
78
+    @Ignore
73 79
     @Test
74 80
     public void includeNumbers() {
75 81
         Map<String, Integer> actualWordCount = new HashMap<String, Integer>();
@@ -84,6 +90,7 @@ public class WordCountTest {
84 90
         );
85 91
     }
86 92
 
93
+    @Ignore
87 94
     @Test
88 95
     public void normalizeCase() {
89 96
         Map<String, Integer> actualWordCount = new HashMap<String, Integer>();

+ 21
- 0
scripts/increase-test-logging.sh Прегледај датотеку

@@ -0,0 +1,21 @@
1
+#!/usr/bin/env bash
2
+
3
+LOGGING_CHUNK_FILE=/tmp/test-logging.gradle
4
+
5
+cat <<-EOF > $LOGGING_CHUNK_FILE
6
+test {
7
+  testLogging {
8
+    exceptionFormat = 'full'
9
+    events = ["passed", "failed", "skipped"]
10
+  }
11
+}
12
+EOF
13
+
14
+for file in `find . -name "build.gradle"`; do
15
+  tempfile="/tmp/increase-test-logging.tmp"
16
+
17
+  echo -e "\n\n\n*** $file ******************************"
18
+  cat $file $LOGGING_CHUNK_FILE > "$tempfile"
19
+  mv "$tempfile" "$file"
20
+done
21
+

+ 15
- 0
scripts/insert-ignores.sh Прегледај датотеку

@@ -0,0 +1,15 @@
1
+#!/usr/bin/env bash
2
+
3
+for file in `find . -name "*Test.java"`; do
4
+  tempfile="/tmp/insert-ignores.tmp"
5
+
6
+  echo -e "\n\n\n*** $file ******************************"
7
+  cat $file | \
8
+  sed 's/import org.junit.Test;/import org.junit.Test;\
9
+import org.junit.Ignore;/' | \
10
+  sed 's/@Test/@Ignore\
11
+    @Test/' | \
12
+  sed '1,/@Ignore/s/.*@Ignore//' > "$tempfile" \
13
+  && mv "$tempfile" "$file"
14
+done
15
+