public void Handle_CanModify_Test1() { //arrange var states = CreateTestListStates(); var inclination = new Inclination(); inclination.SetStates(states); inclination.CanModify = false; var head = new Head(new List <IBodyPart>() { inclination }); var robot = new Robot(new List <IBodyPartCollection>() { head }); //act var request = new RequestNextStateOfBodyPartInteractor(robot); var requestMessage = new NextStateOfBodyPartRequestMessage(head.Id, inclination.Id); var responseTask = request.Handle(requestMessage, CancellationToken.None); responseTask.Wait(); //assert Assert.NotNull(responseTask); Assert.NotNull(responseTask.Result); Assert.False(responseTask.Result.Success); }
public static IObservableBodyPart CreateInclination() { var inclinationStateMachine = CreateHeadInclinationStateList(); var rotation = new Inclination() { Id = GenerateGuidId() }; rotation.SetStates(inclinationStateMachine); return(rotation); }