<commit_before>package navigation;

import com.thoughtworks.rover.navigation.Compass;
import com.thoughtworks.rover.universe.Coordinates;
import com.thoughtworks.rover.navigation.Navigator;
import com.thoughtworks.rover.universe.Plateau;
import org.junit.Assert;
import org.junit.Test;

public class NavigatorTest {

    @Test
    public void TestThatNavigatorPointsToDirectionOnRightWhenRotatedRight() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,2);
        Navigator roverNavigator = new Navigator(new Compass().pointingToNorth(), atCoordinates, mars);

        //When
        roverNavigator.rotateRight();

        //Then
        Assert.assertEquals("1 2 E", roverNavigator.currentLocation());
    }

    @Test
    public void TestThatNavigatorPointsToDirectionOnLeftWhenRotatedLeft() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,1);
        Navigator roverNavigator = new Navigator(new Compass().pointingToNorth(), atCoordinates, mars);

        //When
        roverNavigator.rotateLeft();

        //Then
        Assert.assertEquals("1 1 W", roverNavigator.currentLocation());
    }

    @Test
    public void TestThatNavigatorMovesForwardOnXAxisByOneStepIfDirectionAheadIsNorth() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,1);
        Navigator roverNavigator = new Navigator(new Compass().pointingToNorth(), atCoordinates, mars);

        //When
        roverNavigator.move();

        //Then
        Assert.assertEquals("1 2 N", roverNavigator.currentLocation());
    }

    @Test
    public void TestThatNavigatorMovesBackOnYAxisByOneStepIfDirectionAheadIsSouth() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,1);
        Navigator roverNavigator = new Navigator(new Compass().pointingToSouth(), atCoordinates, mars);

        //When
        roverNavigator.move();

        //Then
        Assert.assertEquals("1 0 S", roverNavigator.currentLocation());
    }

    @Test
    public void TestThatNavigatorMovesForwardOnYAxisByOneStepIfDirectionAheadIsEast() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,1);
        Navigator roverNavigator = new Navigator(new Compass().pointingToEast(), atCoordinates, mars);

        //When
        roverNavigator.move();

        //Then
        Assert.assertEquals("2 1 E", roverNavigator.currentLocation());
    }

    @Test
    public void TestThatNavigatorMovesBackOnYAxisByOneStepIfDirectionAheadIsWest() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,1);
        Navigator roverNavigator = new Navigator(new Compass().pointingToWest(), atCoordinates, mars);

        //When
        roverNavigator.move();

        //Then
        Assert.assertEquals("0 1 W", roverNavigator.currentLocation());
    }

    @Test
    public void TestThatCurrentLocationIsCombinationOfXCoordinateYCoordinateAndDirection() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,1);
        Navigator roverNavigator = new Navigator(new Compass().pointingToWest(), atCoordinates, mars);

        //When
        String locationString = roverNavigator.currentLocation();

        //Then
        Assert.assertEquals("1 1 W", locationString);
    }

}
<commit_msg>Fixing the case of the method name in test files<commit_after>package navigation;

import com.thoughtworks.rover.navigation.Compass;
import com.thoughtworks.rover.universe.Coordinates;
import com.thoughtworks.rover.navigation.Navigator;
import com.thoughtworks.rover.universe.Plateau;
import org.junit.Assert;
import org.junit.Test;

public class NavigatorTest {

    @Test
    public void testThatNavigatorPointsToDirectionOnRightWhenRotatedRight() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,2);
        Navigator roverNavigator = new Navigator(new Compass().pointingToNorth(), atCoordinates, mars);

        //When
        roverNavigator.rotateRight();

        //Then
        Assert.assertEquals("1 2 E", roverNavigator.currentLocation());
    }

    @Test
    public void testThatNavigatorPointsToDirectionOnLeftWhenRotatedLeft() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,1);
        Navigator roverNavigator = new Navigator(new Compass().pointingToNorth(), atCoordinates, mars);

        //When
        roverNavigator.rotateLeft();

        //Then
        Assert.assertEquals("1 1 W", roverNavigator.currentLocation());
    }

    @Test
    public void testThatNavigatorMovesForwardOnXAxisByOneStepIfDirectionAheadIsNorth() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,1);
        Navigator roverNavigator = new Navigator(new Compass().pointingToNorth(), atCoordinates, mars);

        //When
        roverNavigator.move();

        //Then
        Assert.assertEquals("1 2 N", roverNavigator.currentLocation());
    }

    @Test
    public void testThatNavigatorMovesBackOnYAxisByOneStepIfDirectionAheadIsSouth() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,1);
        Navigator roverNavigator = new Navigator(new Compass().pointingToSouth(), atCoordinates, mars);

        //When
        roverNavigator.move();

        //Then
        Assert.assertEquals("1 0 S", roverNavigator.currentLocation());
    }

    @Test
    public void testThatNavigatorMovesForwardOnYAxisByOneStepIfDirectionAheadIsEast() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,1);
        Navigator roverNavigator = new Navigator(new Compass().pointingToEast(), atCoordinates, mars);

        //When
        roverNavigator.move();

        //Then
        Assert.assertEquals("2 1 E", roverNavigator.currentLocation());
    }

    @Test
    public void testThatNavigatorMovesBackOnYAxisByOneStepIfDirectionAheadIsWest() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,1);
        Navigator roverNavigator = new Navigator(new Compass().pointingToWest(), atCoordinates, mars);

        //When
        roverNavigator.move();

        //Then
        Assert.assertEquals("0 1 W", roverNavigator.currentLocation());
    }

    @Test
    public void testThatCurrentLocationIsCombinationOfXCoordinateYCoordinateAndDirection() {
        //Given
        Plateau mars = new Plateau(5,5);
        Coordinates atCoordinates = new Coordinates(1,1);
        Navigator roverNavigator = new Navigator(new Compass().pointingToWest(), atCoordinates, mars);

        //When
        String locationString = roverNavigator.currentLocation();

        //Then
        Assert.assertEquals("1 1 W", locationString);
    }

}

{'fraction_non_alphanumeric': 0.09866853538892782, 'fraction_numerical': 0.011772950245269797, 'mean_word_length': 2.982142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7039771', 'n_tokens_mistral': 2115, 'n_tokens_neox': 2010, 'n_words': 425}