Просмотр исходного кода

Update rectangles version file and add test. Closes #1372 (#1394)

* update version file to 1.1.0

* add test to verify no rectangle when there are no rows

* fix test naming to match canonical data

* correct spacing for added test
Tendai Mudyiwa 8 лет назад
Родитель
Сommit
324c61c444

+ 1
- 1
exercises/rectangles/.meta/version Просмотреть файл

@@ -1 +1 @@
1
-1.0.0
1
+1.1.0

+ 9
- 1
exercises/rectangles/src/test/java/RectangleCounterTest.java Просмотреть файл

@@ -14,12 +14,20 @@ public class RectangleCounterTest {
14 14
     }
15 15
 
16 16
     @Test
17
-    public void testInputWithNoColumnsContainsNoRectangles() {
17
+    public void testInputWithNoRowsContainsNoRectangles() {
18 18
         String[] inputGrid = new String[]{};
19 19
 
20 20
         assertEquals(0, rectangleCounter.countRectangles(inputGrid));
21 21
     }
22
+    
23
+    @Ignore("Remove to run test")
24
+    @Test
25
+    public void testInputWithNoColumnsContainsNoRectangles() {
26
+        String[] inputGrid = new String[]{""};
22 27
 
28
+        assertEquals(0, rectangleCounter.countRectangles(inputGrid));
29
+    }
30
+    
23 31
     @Ignore("Remove to run test")
24 32
     @Test
25 33
     public void testNonTrivialInputWithNoRectangles() {