package com.rgi.common;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
 * Created by steven.lander on 10/28/15.
 */
public class PairTest
{
    @Test
    public void testNullPair()
    {
        final Pair<String, String> stringPair1 = new Pair<>(null, null);
        final Pair<String, String> stringPair2 = new Pair<>(null, null);
        assertEquals("Null pairs should evaluate true.", stringPair1, stringPair2);
    }

    @Test
    public void testGetLeft()
    {
        final Pair<Integer, Integer> integerPair = new Pair<>(1, 2);
        //assertEquals(, integerPair.getLeft(), 1);
        assertEquals("Get left should return left value.", 1, (int)integerPair.getLeft());
    }

    /*@Test
    public void testGetRight()
    {

    }

    @Test
    public void testEquals()
    {

    }

    @Test
    public void testHashcode()
    {

    }*/
}

@@ -86,16 +86,103 @@
 tEquals;
+%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;
 %0A%0A/**%0A *
@@ -651,60 +651,8 @@
 2);%0A
-        //assertEquals(, integerPair.getLeft(), 1);%0A
     
@@ -749,18 +749,16 @@
  %7D%0A%0A    
-/*
 @Test%0A  
@@ -796,123 +796,1847 @@
   %7B%0A
-%0A    %7D%0A%0A    @Test%0A    public void testEquals()%0A    %7B%0A%0A    %7D%0A%0A    @Test%0A    public void testHashcode()%0A    %7B%0A
+        final Pair%3CInteger, Integer%3E integerPair = new Pair%3C%3E(1, 2);%0A        assertEquals(%22Get left should return left value.%22, 2, (int)integerPair.getRight());%0A    %7D%0A%0A    @Test%0A    public void testEqualsBranchOne()%0A    %7B%0A        final Pair%3CString, Integer%3E stringIntegerPair = new Pair%3C%3E(%22foo%22, 1);%0A        assertTrue(%22Pairs should be equal.%22, stringIntegerPair.equals(stringIntegerPair));%0A    %7D%0A%0A    @Test%0A    public void testEqualsBranchTwo()%0A    %7B%0A        final Pair%3CString, Integer%3E stringIntegerPair = new Pair%3C%3E(%22foo%22, 1);%0A        final Integer notEqualObject = 1;%0A        assertFalse(%22Pairs should be equal.%22, stringIntegerPair.equals(notEqualObject));%0A    %7D%0A%0A    @Test%0A    public void testEqualsBranchThree()%0A    %7B%0A        final Pair%3CString, Integer%3E stringIntegerPair = new Pair%3C%3E(%22foo%22, 1);%0A        assertFalse(%22Pairs should be equal.%22, stringIntegerPair.equals(null));%0A    %7D%0A%0A    @Test%0A    public void testEqualsBranchFour()%0A    %7B%0A        final Pair%3CString, Integer%3E stringIntegerPair1 = new Pair%3C%3E(%22foo%22, 1);%0A        final Pair%3CString, Integer%3E stringIntegerPair2 = new Pair%3C%3E(%22foo%22, 2);%0A        assertFalse(%22Pairs should be equal.%22, stringIntegerPair1.equals(stringIntegerPair2));%0A    %7D%0A%0A    @Test%0A    public void testEqualsBranchFive()%0A    %7B%0A        final Pair%3CString, Integer%3E stringIntegerPair1 = new Pair%3C%3E(%22foo%22, 1);%0A        final Pair%3CString, Integer%3E stringIntegerPair2 = new Pair%3C%3E(%22bar%22, 1);%0A        assertFalse(%22Pairs should be equal.%22, stringIntegerPair1.equals(stringIntegerPair2));%0A    %7D%0A%0A    @Test%0A    public void testHashcode()%0A    %7B%0A        final Pair%3CString, Integer%3E stringIntegerPair1 = new Pair%3C%3E(%22foo%22, 1);%0A        final Pair%3CString, Integer%3E stringIntegerPair2 = new Pair%3C%3E(%22foo%22, 1);%0A        assertEquals(%22Hashcodes should be equal.%22, stringIntegerPair1.hashCode(), stringIntegerPair2.hashCode());
 %0A    %7D
-*/
 %0A%7D%0A

add most test cases for Pair, if not all