public void GetInternalPosition_WithLeftLayerRotatedUp_ShouldWork() { //Arrange var cube = new Cube.Model.Impl.Cube(); const string TestPosition = @" ryy ryy ryy bbb hrr ggg ooy bbb hrr ggg ooy bbb hrr ggg ooy ohh ohh ohh "; CubeColor[, ,] expected = BuildInternalArrayForSolution(); expected[0, 0, 0] = CubeColor.R; expected[0, 1, 0] = CubeColor.R; expected[0, 2, 0] = CubeColor.R; expected[2, 0, 0] = CubeColor.H; expected[2, 1, 0] = CubeColor.H; expected[2, 2, 0] = CubeColor.H; expected[4, 0, 2] = CubeColor.Y; expected[4, 1, 2] = CubeColor.Y; expected[4, 2, 2] = CubeColor.Y; expected[5, 0, 0] = CubeColor.O; expected[5, 1, 0] = CubeColor.O; expected[5, 2, 0] = CubeColor.O; //Act CubeColor[, ,] actual = cube.ToInternalPositionArray(TestPosition); //Assert Assert.IsNotNull(actual); AssertAreEqualPositons(expected, actual); }
public void GetInternalPosition_WithASolutionInLowerCase_ShouldWork() { //Arrange var cube = new Cube.Model.Impl.Cube(); const string TestPosition = @" yyy yyy yyy bbb rrr ggg ooo bbb rrr ggg ooo bbb rrr ggg ooo hhh hhh hhh "; CubeColor[, ,] expected = BuildInternalArrayForSolution(); //Act CubeColor[, ,] actual = cube.ToInternalPositionArray(TestPosition); //Assert AssertAreEqualPositons(expected, actual); }