MakeNewReservation() 공개 메소드

public MakeNewReservation ( ) : MakeReservationCommand
리턴 Ploeh.Samples.Booking.DomainModel.MakeReservationCommand
예제 #1
0
        public ViewResult NewBooking(BookingViewModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            this.channel.Send(model.MakeNewReservation());
            return this.View("BookingReceipt", model);
        }
예제 #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);
 }