public void WhenGetLocationWithNorthDirection() { var mockLocationCalc = new Mock <ILocationCalculator>(); var northBound = new NorthBound(mockLocationCalc.Object); var result = northBound.GetLocation(new Position(new Location(1, 1), Direction.North), 1); Assert.Equal(1, result.location.X); Assert.Equal(2, result.location.Y); }
public void WhenGetLocationEastDirection() { var mockLocationCalc = new Mock <ILocationCalculator>(); mockLocationCalc.Setup(c => c.GetLocation(It.IsAny <Position>(), 1)); var northBound = new NorthBound(mockLocationCalc.Object); var result = northBound.GetLocation(new Position(new Location(1, 1), Direction.East), 1); mockLocationCalc.Verify(calc => calc.GetLocation(It.IsAny <Position>(), 1)); }