package com.fishercoder;

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

import static org.junit.Assert.assertEquals;

/**
 * Created by fishercoder on 5/9/17.
 */
public class _215Test {
    private static _215.Solution2 solution2;
    private static int k;
    private static int[] nums;
    private static int actual;
    private static int expected;

    @BeforeClass
    public static void setup() {
        solution2 = new _215.Solution2();
    }

    @Test
    public void test1() {
        k = 2;
        nums = new int[]{3, 2, 1, 5, 6, 4};
        actual = solution2.findKthLargest(nums, k);
        expected = 5;
        assertEquals(expected, actual);
    }
}

@@ -162,76 +162,121 @@
 s;%0A%0A
-/**%0A * Created by fishercoder on 5/9/17.%0A */%0Apublic class _215Test %7B
+public class _215Test %7B%0A    private static _215.Solution1 solution1;%0A    private static _215.Solution2 solution2;
 %0A   
@@ -296,33 +296,33 @@
 ic _215.Solution
-2
+3
  solution2;%0A    
@@ -306,33 +306,33 @@
 lution3 solution
-2
+3
 ;%0A    private st
@@ -378,39 +378,8 @@
 ms;%0A
-    private static int actual;%0A
     
@@ -478,152 +478,649 @@
 tion
-2 = new _215.Solution2();%0A    %7D%0A%0A    @Test%0A    public void test1() %7B%0A        k = 2;%0A        nums = new int%5B%5D%7B3, 2, 1, 5, 6, 4%7D;%0A        actual =
+1 = new _215.Solution1();%0A        solution2 = new _215.Solution2();%0A        solution3 = new _215.Solution3();%0A    %7D%0A%0A    @Test%0A    public void test1() %7B%0A        k = 2;%0A        nums = new int%5B%5D%7B3, 2, 1, 5, 6, 4%7D;%0A        expected = 5;%0A        assertEquals(expected, solution1.findKthLargest(nums, k));%0A        assertEquals(expected, solution2.findKthLargest(nums, k));%0A        assertEquals(expected, solution3.findKthLargest(nums, k));%0A    %7D%0A%0A    @Test%0A    public void test2() %7B%0A        k = 1;%0A        nums = new int%5B%5D%7B1%7D;%0A        expected = 1;%0A        assertEquals(expected, solution1.findKthLargest(nums, k));%0A        assertEquals(expected,
  sol
@@ -1149,16 +1149,17 @@
 nums, k)
+)
 ;%0A      
@@ -1164,59 +1164,377 @@
     
-expected = 5;%0A        assertEquals(expected, actual
+assertEquals(expected, solution3.findKthLargest(nums, k));%0A    %7D%0A%0A    @Test%0A    public void test3() %7B%0A        k = 2;%0A        nums = new int%5B%5D%7B2, 1%7D;%0A        expected = 1;%0A        assertEquals(expected, solution1.findKthLargest(nums, k));%0A        assertEquals(expected, solution2.findKthLargest(nums, k));%0A        assertEquals(expected, solution3.findKthLargest(nums, k)
 );%0A 

add tests for 215