package com.fishercoder;

import com.fishercoder.solutions._994;
import org.junit.BeforeClass;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class _994Test {
  private static _994.Solution1 solution1;
  private static int[][] grid;

  @BeforeClass
  public static void setUp() {
    solution1 = new _994.Solution1();
  }

  @Test
  public void test1() {
    grid = new int[][] {
        {2, 1, 1},
        {1, 1, 0},
        {0, 1, 1}
    };
    assertEquals(4, solution1.orangesRotting(grid));
  }

  @Test
  public void test2() {
    grid = new int[][] {
        {2, 1, 1},
        {0, 1, 1},
        {1, 0, 1}
    };
    assertEquals(-1, solution1.orangesRotting(grid));
  }

  @Test
  public void test3() {
    grid = new int[][] {
        {0, 2}
    };
    assertEquals(0, solution1.orangesRotting(grid));
  }
}

@@ -182,16 +182,18 @@
 4Test %7B%0A
+  
   privat
@@ -227,16 +227,18 @@
 ution1;%0A
+  
   privat
@@ -261,16 +261,18 @@
  grid;%0A%0A
+  
   @Befor
@@ -278,16 +278,18 @@
 reClass%0A
+  
   public
@@ -307,24 +307,28 @@
 d setUp() %7B%0A
+    
     solution
@@ -353,29 +353,33 @@
 ion1();%0A
+  
   %7D%0A%0A
+  
   @Test%0A
   public
@@ -362,32 +362,34 @@
    %7D%0A%0A    @Test%0A
+  
   public void te
@@ -392,32 +392,36 @@
 d test1() %7B%0A    
+  
+  
 grid = new int%5B%5D
@@ -414,33 +414,32 @@
 id = new int%5B%5D%5B%5D
- 
 %7B%0A        %7B2, 1,
@@ -424,32 +424,40 @@
 nt%5B%5D%5B%5D%7B%0A        
+ 
+       
 %7B2, 1, 1%7D,%0A     
@@ -455,24 +455,32 @@
 1%7D,%0A        
+ 
+       
 %7B1, 1, 0%7D,%0A 
@@ -478,32 +478,40 @@
  1, 0%7D,%0A        
+ 
+       
 %7B0, 1, 1%7D%0A    %7D;
@@ -500,35 +500,43 @@
   %7B0, 1, 1%7D%0A    
+ 
-%7D;%0A
+   %7D;%0A    
     assertEquals
@@ -568,37 +568,43 @@
 ing(grid));%0A
+  
   %7D%0A%0A  
+ 
+ 
 @Test%0A
+  
   public voi
@@ -611,32 +611,36 @@
 d test2() %7B%0A    
+   
+ 
 grid = new int%5B%5D
@@ -633,33 +633,32 @@
 id = new int%5B%5D%5B%5D
- 
 %7B%0A        %7B2, 1,
@@ -643,32 +643,40 @@
 nt%5B%5D%5B%5D%7B%0A        
+      
+  
 %7B2, 1, 1%7D,%0A     
@@ -670,32 +670,40 @@
  1, 1%7D,%0A        
+      
+  
 %7B0, 1, 1%7D,%0A     
@@ -701,24 +701,32 @@
 1%7D,%0A        
+      
+  
 %7B1, 0, 1%7D%0A  
@@ -719,24 +719,28 @@
   %7B1, 0, 1%7D%0A
+    
     %7D;%0A    a
@@ -730,32 +730,36 @@
 %0A        %7D;%0A    
+  
+  
 assertEquals(-1,
@@ -796,21 +796,27 @@
 ));%0A
+  
   %7D%0A%0A  
+ 
+ 
 @Test%0A
+  
   pu
@@ -831,24 +831,28 @@
 d test3() %7B%0A
+    
     grid = n
@@ -861,17 +861,16 @@
  int%5B%5D%5B%5D
- 
 %7B%0A      
@@ -867,24 +867,32 @@
 %5B%5D%7B%0A        
+   
+     
 %7B0, 2%7D%0A    %7D
@@ -886,27 +886,35 @@
  %7B0, 2%7D%0A    
+  
+  
 %7D;%0A
+    
     assertEq
@@ -954,14 +954,16 @@
 grid));%0A
+  
   %7D%0A%7D%0A

refactor 994