public void GoalAndEndShouldHaveCorrectTiles() { SetUpSuccessfulSequence(); var adder = new GoalAndStartAdder(); adder.ImproveMap(mapMock.Object, randomMock.Object); mapMock.Verify(foo => foo.SetTile(It.IsAny <Vector2Int>(), It.IsAny <GoalTile>())); mapMock.Verify(foo => foo.SetTile(It.IsAny <Vector2Int>(), It.IsAny <StartTile>())); }
public void GoalAndEndShouldBeSet() { SetUpSuccessfulSequence(); var adder = new GoalAndStartAdder(); adder.ImproveMap(mapMock.Object, randomMock.Object); mapMock.VerifySet(foo => foo.Goal = It.IsAny <Vector2Int>()); mapMock.VerifySet(foo => foo.Start = It.IsAny <Vector2Int>()); }
public void GoalAndEndShouldNotBeInSameLocation() { SetUpSuccessfulSequence(); var startLocation = new Vector2Int(int.MaxValue, int.MaxValue); var goalLocation = new Vector2Int(int.MaxValue, int.MaxValue); mapMock.SetupSet(h => h.Start = It.IsAny <Vector2Int>()).Callback <Vector2Int>(r => startLocation = r); mapMock.SetupSet(h => h.Goal = It.IsAny <Vector2Int>()).Callback <Vector2Int>(r => goalLocation = r); var adder = new GoalAndStartAdder(); adder.ImproveMap(mapMock.Object, randomMock.Object); Assert.AreNotEqual(startLocation, goalLocation); }