package com.fishercoder;

import com.fishercoder.common.classes.ListNode;
import com.fishercoder.common.utils.LinkedListUtils;
import com.fishercoder.solutions._206;
import org.junit.BeforeClass;
import org.junit.Test;

import static junit.framework.TestCase.assertEquals;

/**
 * Created by stevesun on 6/5/17.
 */
public class _206Test {
    private static _206.Solution1 solution1;
    private static _206.Solution2 solution2;
    private static ListNode head;

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

    @Test
    public void test1() {
        head = LinkedListUtils.contructLinkedList(new int[]{1,2,3});
        assertEquals(LinkedListUtils.contructLinkedList(new int[]{3,2,1}), solution1.reverseList(head));

        head = LinkedListUtils.contructLinkedList(new int[]{1,2,3});
        assertEquals(LinkedListUtils.contructLinkedList(new int[]{3,2,1}), solution2.reverseList(head));
    }
}

@@ -271,50 +271,8 @@
 s;%0A%0A
-/**%0A * Created by stevesun on 6/5/17.%0A */%0A
 publ
@@ -647,34 +647,36 @@
 ist(new int%5B%5D%7B1,
+ 
 2,
+ 
 3%7D);%0A        ass
@@ -724,34 +724,36 @@
 ist(new int%5B%5D%7B3,
+ 
 2,
+ 
 1%7D), solution1.r
@@ -834,18 +834,20 @@
 int%5B%5D%7B1,
+ 
 2,
+ 
 3%7D);%0A   
@@ -911,18 +911,20 @@
 int%5B%5D%7B3,
+ 
 2,
+ 
 1%7D), sol

refactor 206