public void GetCellForPos_Should_Return_MazeEntrance_For_Arobase() { IMazeCellFactory factoryTested = new DayEighteenMazeFactory(); int x = 3; int y = 1; StringBuilder mazeDef = new StringBuilder(); mazeDef.AppendLine(" "); mazeDef.AppendLine(" @ "); mazeDef.AppendLine(" "); MazeCell cell = factoryTested.GetCellForPos(x, y, mazeDef.ToString().ToDoubleCharArray()); cell.Should().BeOfType <MazeEntrance>(); cell.X.Should().Be(x); cell.Y.Should().Be(y); }
public void GetCellForPos_Should_Return_MazeDoor_For_UppercaseLetter() { IMazeCellFactory factoryTested = new DayEighteenMazeFactory(); int x = 3; int y = 1; StringBuilder mazeDef = new StringBuilder(); mazeDef.AppendLine(" "); mazeDef.AppendLine(" O "); mazeDef.AppendLine(" "); MazeCell cell = factoryTested.GetCellForPos(x, y, mazeDef.ToString().ToDoubleCharArray()); cell.Should().BeOfType <MazeDoor>(); cell.X.Should().Be(x); cell.Y.Should().Be(y); (cell as MazeDoor).Id.Should().Be('O'); }