/**
 *    Copyright 2011 Alexander Pucher
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */
package com.alexpucher.batchcompare;

import static org.junit.Assert.assertTrue;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import com.alexpucher.batchcompare.processor.PairImpl;

public class PairTest {
    
    private PairImpl smallDifference;
    private PairImpl bigDifference;

    @Before
    public void setUp() throws Exception {
        smallDifference = new PairImpl(new Object(), new Object());
        smallDifference.setDifference(1);

        bigDifference = new PairImpl(new Object(), new Object());
        bigDifference.setDifference(5);
}

    @After
    public void tearDown() throws Exception {

    }
    
    @Test
    public void CompareToEqualTest() {        
        assertTrue("equal difference", smallDifference.compareTo(smallDifference) == 0);
    }

    @Test
    public void CompareToSmallerTest() {        
        assertTrue("smaller difference", bigDifference.compareTo(smallDifference) > 0);
    }

    @Test
    public void CompareToBiggerTest() {        
        assertTrue("bigger difference", smallDifference.compareTo(bigDifference) < 0);
    }

}
