Przeglądaj źródła

Fixes #745 correct spelling mistake

Tyler Matthews 9 lat temu
rodzic
commit
a8193b5364

+ 1
- 1
exercises/largest-series-product/src/example/java/LargestSeriesProductCalculator.java Wyświetl plik

36
         if (stringToSearch == null) {
36
         if (stringToSearch == null) {
37
             throw new IllegalArgumentException("String to search must be non-null.");
37
             throw new IllegalArgumentException("String to search must be non-null.");
38
         } else if (!stringToSearch.chars().allMatch(Character::isDigit)) {
38
         } else if (!stringToSearch.chars().allMatch(Character::isDigit)) {
39
-            throw new IllegalArgumentException("String to search may only contains digits.");
39
+            throw new IllegalArgumentException("String to search may only contain digits.");
40
         }
40
         }
41
     }
41
     }
42
 
42
 

+ 1
- 1
exercises/largest-series-product/src/test/java/LargestSeriesProductCalculatorTest.java Wyświetl plik

186
     @Test
186
     @Test
187
     public void testStringToSearchContainingNonDigitCharacterIsRejected() {
187
     public void testStringToSearchContainingNonDigitCharacterIsRejected() {
188
         expectedException.expect(IllegalArgumentException.class);
188
         expectedException.expect(IllegalArgumentException.class);
189
-        expectedException.expectMessage("String to search may only contains digits.");
189
+        expectedException.expectMessage("String to search may only contain digits.");
190
 
190
 
191
         new LargestSeriesProductCalculator("1234a5");
191
         new LargestSeriesProductCalculator("1234a5");
192
     }
192
     }