public void CreateActorTask_CurrentMoveTaskWithSameTarget_ReturnsCurrentMoveTask() { // ARRANGE var mapMock = new Mock <IMap>(); var map = mapMock.Object; var nodeMock = new Mock <IMapNode>(); var node = nodeMock.Object; var actorMock = new Mock <IActor>(); var actor = actorMock.Object; var currentTask = new MoveTask(actor, node, map); var intention = new MoveIntention(node, map); // ACT var factTask = intention.CreateActorTask(currentTask, actor); // ASSERT factTask.Should().Be(currentTask); }
public void CreateActorTask_CurrentIsNotMoveTask_ReturnsMoveTask() { // ARRANGE var mapMock = new Mock <IMap>(); var map = mapMock.Object; var nodeMock = new Mock <IMapNode>(); var node = nodeMock.Object; var actorMock = new Mock <IActor>(); var actor = actorMock.Object; var currentTaskMock = new Mock <IActorTask>(); var currentTask = currentTaskMock.Object; var intention = new MoveIntention(node, map); // ACT var factTask = intention.CreateActorTask(currentTask, actor); // ASSERT factTask.Should().BeOfType <MoveTask>() .And.Subject.As <MoveTask>().TargetNode.Should().Be(node); }