MakeNewReservation() public method

public MakeNewReservation ( ) : MakeReservationCommand
return Ploeh.Samples.Booking.DomainModel.MakeReservationCommand
Esempio n. 1
0
        public ViewResult NewBooking(BookingViewModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            this.channel.Send(model.MakeNewReservation());
            return this.View("BookingReceipt", model);
        }
Esempio n. 2
0
        public ViewResult NewBooking(BookingViewModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            this.channel.Send(model.MakeNewReservation());
            return(this.View("BookingReceipt", model));
        }
 public void MakeNewReservationReturnsCorrectResult(BookingViewModel sut)
 {
     MakeReservationCommand result = sut.MakeNewReservation();
     var expected = sut.AsSource().OfLikeness<MakeReservationCommand>().Without(d => d.Id);
     expected.ShouldEqual(result);
 }