Exemple #1
0
        public virtual IReservationStep CreateInstance(ReservationStepType reservationStep)
        {
            Func <IReservationStep> instanceBuilder;

            if (!_reservationStepsInstances.TryGetValue(reservationStep, out instanceBuilder))
            {
                throw new NotImplementedException("There is no implementation of IReservationStep interface for given Reservation Step Type");
            }
            return(instanceBuilder());
        }
Exemple #2
0
        public void ShouldCreateStep()
        {
            const ReservationStepType dummyStepType = (ReservationStepType)(-1);

            _subject.Execute(new List <ReservationStepType> {
                dummyStepType
            });

            A.CallTo(() => _stepFactoryDouble.CreateInstance(dummyStepType)).MustHaveHappened();
        }