public void Should_GetNumberOfTreesInAway(MapDay3 map, int expected) { var solver = new PuzzleSolverDay3(); var result = solver.GetNumberOfTreesInAway(map); Assert.Equal(expected, result); }
public void Should_DidLeftMap(MapDay3 map, bool expectedLeftMap) { map.Move(); map.Move(); var left = map.DidLeftMap(); Assert.Equal(expectedLeftMap, left); }
public void Should_Move(MapDay3 map, int expectedX, int expectedY) { map.Move(); var x = map.CurrentPositionX; var y = map.CurrentPositionY; Assert.Equal(expectedX, x); Assert.Equal(expectedY, y); }
public void ShouldNot_IsAtTree(MapDay3 map) { map.Move(); Assert.Throws <ArgumentOutOfRangeException>(() => map.IsAtTree());; }
public void Should_IsAtTree(MapDay3 map, bool expectedIsOnTree) { var isOnTree = map.IsAtTree(); Assert.Equal(expectedIsOnTree, isOnTree); }