package universe;

import com.thoughtworks.rover.universe.Coordinates;
import org.junit.Assert;
import org.junit.Test;

public class CoordinateTest {

    @Test
    public void testThatXCoordinateValueIsIncrementWhenStepValueIsPositive() {
        //Given
        Coordinates coordinatesSet = new Coordinates(2,3);

        //When
        coordinatesSet.changeXCoordinatesBy(1);

        //Then
        Assert.assertEquals("3 3", coordinatesSet.toString());
    }

    @Test
    public void testThatXCoordinateValueIsDecrementWhenStepValueIsNegative() {
        //Given
        Coordinates coordinatesSet = new Coordinates(2,3);

        //When
        coordinatesSet.changeXCoordinatesBy(-1);

        //Then
        Assert.assertEquals("1 3", coordinatesSet.toString());
    }

    @Test
    public void testThatYCoordinateValueIsIncrementWhenStepValueIsPositive() {
        //Given
        Coordinates coordinatesSet = new Coordinates(2,3);

        //When
        coordinatesSet.changeYCoordinatesBy(1);

        //Then
        Assert.assertEquals("2 4", coordinatesSet.toString());
    }

    @Test
    public void testThatYCoordinateValueIsDecrementWhenStepValueIsNegative() {
        //Given
        Coordinates coordinatesSet = new Coordinates(2,3);

        //When
        coordinatesSet.changeYCoordinatesBy(-1);

        //Then
        Assert.assertEquals("2 2", coordinatesSet.toString());
    }

    @Test
    public void testThatXCoordinateSmallerThanCurrentCoordinatesAreIdentifiedCorrectly() {
        //Given
        Coordinates coordinatesSet = new Coordinates(5,5);

        //When
        Coordinates coordinatesToCheck = new Coordinates(4,5);

        //Then
        Assert.assertTrue(coordinatesSet.isGreaterThan(coordinatesToCheck));
    }


    @Test
    public void testThatYCoordinateSmallerThanCurrentCoordinatesAreIdentifiedCorrectly() {
        //Given
        Coordinates coordinatesSet = new Coordinates(5,5);

        //When
        Coordinates coordinatesToCheck = new Coordinates(5,4);

        //Then
        Assert.assertTrue(coordinatesSet.isGreaterThan(coordinatesToCheck));
    }


    @Test
    public void testThatXCoordinateGreaterThanCurrentCoordinatesAreIdentifiedCorrectly() {
        //Given
        Coordinates coordinatesSet = new Coordinates(5,5);

        //When
        Coordinates coordinatesToCheck = new Coordinates(8,5);

        //Then
        Assert.assertTrue(coordinatesSet.isLessThan(coordinatesToCheck));
    }


    @Test
    public void testThatYCoordinateGreaterThanCurrentCoordinatesAreIdentifiedCorrectly() {
        //Given
        Coordinates coordinatesSet = new Coordinates(5,5);

        //When
        Coordinates coordinatesToCheck = new Coordinates(5,8);

        //Then
        Assert.assertTrue(coordinatesSet.isLessThan(coordinatesToCheck));
    }

    @Test
    public void testThatCoordinatesCanProvideNewerCoordinatesForAGivenStepSizeWithoutChangingCurrentCoordinates() {
        //Given
        Coordinates coordinatesSet = new Coordinates(5,5);

        //When
        Coordinates updatedCoordinates = coordinatesSet.newCoordinatesForStepSize(1, -1);

        //Then
        Assert.assertEquals("6 4", updatedCoordinates.toString());
        Assert.assertEquals("5 5", coordinatesSet.toString());
    }

}

@@ -1394,32 +1394,152 @@
 ring());%0A    %7D%0A%0A
+    /*%0A    Chirag: your testname has %22smaller than%22 and the assert has %22greater than%22. Both should be symmetric%0A    **/%0A
     @Test%0A    pu

Update CoordinateTest.java