public void ShouldExecuteCreatedStepWithStepsInputs() { var stepDouble = A.Fake <IReservationStep>(); _subject.ExecuteSteps(new List <IReservationStep> { stepDouble }, _stepsInputs); A.CallTo(() => stepDouble.Execute(_stepsInputs)).MustHaveHappened(); }
public void ShouldExecuteStepsForProvidedHotelId() { const int dummyHotelId = 1; var stepInputsDouble = new List <StepInput> { A.Fake <StepInput>() }; var stepDouble = A.Fake <IReservationStep>(); A.CallTo(() => _hotelSystemDouble.GetHotelReservationSteps(A <int> ._)).Returns((new List <ReservationStepType> { (ReservationStepType)(-1) })); A.CallTo(() => _stepFactoryDouble.CreateInstance(A <ReservationStepType> ._)).Returns(stepDouble); _subject.ReserveHotel(dummyHotelId, stepInputsDouble); A.CallTo(() => _stepExecutorDouble.ExecuteSteps( A <List <IReservationStep> > .That.Matches(steps => steps.Contains(stepDouble)), stepInputsDouble)).MustHaveHappened(); }
private ReadOnlyCollection <StepOutput> ExecuteSteps(List <IReservationStep> reservationSteps, List <StepInput> stepsInputs) { return(new ReadOnlyCollection <StepOutput>(_stepExecutor.ExecuteSteps(reservationSteps, stepsInputs))); }