Exemple #1
0
 public void IsValidPosition_WithASolutionInUpperCase_ShouldBeTrue()
 {
     //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
         ";
     //Act
     bool actual = cube.IsValidPosition(TestPosition);
     //Assert
     Assert.IsTrue(actual, "The solution is a valid position");
 }
Exemple #2
0
 public void IsValidPosition_WithToShortLine8_ShouldThrowAnException()
 {
     //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
     h  h
     hhh
         ";
     //Act
     cube.IsValidPosition(TestPosition);
     //Assert is implicit
 }
Exemple #3
0
 public void IsValidPosition_WithASolutionInLowerCase_ShouldBeTrue()
 {
     //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
         ";
     //Act
     bool actual = cube.IsValidPosition(TestPosition);
     //Assert
     Assert.IsTrue(actual, "The solution is a valid position");
 }