public void SetUp() { _bookingControllerFactory = new BookingControllerFactory(); _inViewModel = new ReviewViewModel(); _inViewModel.BusId = _bookingControllerFactory.BusId; _inViewModel.PickUp = new DateTime(2090, 1, 2); _inViewModel.DropOff = new DateTime(2090, 1, 6); _inViewModel.Forename = "Tom"; _inViewModel.Surname = "Turquoise"; _inViewModel.AddressLine1 = "1 Pink Street"; _inViewModel.AddressLine2 = "Address 2"; _inViewModel.AddressLine3 = "Address 3"; _inViewModel.Town = "Blueborough"; _inViewModel.County = "Purpleshire"; _inViewModel.PostCode = "M1 1AA"; _inViewModel.TelephoneNumber = "01234 567890"; _inViewModel.Email = "*****@*****.**"; _inViewModel.IsMainDriver = false; _inViewModel.DrivingLicenceNumber = "XYZ999"; _inViewModel.DriverForename = "Pam"; _inViewModel.DriverSurname = "Pink"; _inViewModel.NumberOfAdults = 2; _inViewModel.NumberOfChildren = 2; _inViewModel.VoucherCode = "ABC111"; }
public void SetUp() { _bookingControllerFactory = new BookingControllerFactory(); _inViewModel = new MakeViewModel(); _inViewModel.BusId = _bookingControllerFactory.BusId; _inViewModel.PickUp = new DateTime(2090, 1, 2); _inViewModel.DropOff = new DateTime(2090, 1, 6); _inViewModel.Forename = "Tom"; _inViewModel.Surname = "Turquoise"; _inViewModel.AddressLine1 = "1 Pink Street"; _inViewModel.AddressLine2 = "Address 2"; _inViewModel.AddressLine3 = "Address 3"; _inViewModel.Town = "Blueborough"; _inViewModel.County = "Purpleshire"; _inViewModel.PostCode = "M1 1AA"; _inViewModel.TelephoneNumber = "01234 567890"; _inViewModel.Email = "*****@*****.**"; _inViewModel.ConfirmEmail = "*****@*****.**"; _inViewModel.IsMainDriver = false; _inViewModel.DrivingLicenceNumber = "XYZ999"; _inViewModel.DriverForename = "Pam"; _inViewModel.DriverSurname = "Pink"; _inViewModel.NumberOfAdults = 2; _inViewModel.NumberOfChildren = 2; _inViewModel.VoucherCode = "ABC111"; _booking = new Mock <Booking>(); _booking.SetupGet(x => x.PickUp).Returns(new DateTime(2090, 1, 2)); _booking.SetupGet(x => x.DropOff).Returns(new DateTime(2090, 1, 6)); _booking.SetupGet(x => x.IsMainDriver).Returns(false); _booking.SetupGet(x => x.DrivingLicenceNumber).Returns("XYZ999"); _booking.SetupGet(x => x.DriverForename).Returns("Pam"); _booking.SetupGet(x => x.DriverSurname).Returns("Pink"); _booking.SetupGet(x => x.NumberOfAdults).Returns(2); _booking.SetupGet(x => x.NumberOfChildren).Returns(1); var bus = new Mock <Bus>(); bus.SetupGet(x => x.Id).Returns(_bookingControllerFactory.BusId); _booking.SetupGet(x => x.Bus).Returns(bus.Object); var customer = new Mock <Customer>(); customer.SetupGet(x => x.Forename).Returns("Tom"); customer.SetupGet(x => x.Surname).Returns("Turquoise"); customer.SetupGet(x => x.AddressLine1).Returns("1 Pink Street"); customer.SetupGet(x => x.AddressLine2).Returns("Address 2"); customer.SetupGet(x => x.AddressLine3).Returns("Address 3"); customer.SetupGet(x => x.Town).Returns("Blueborough"); customer.SetupGet(x => x.County).Returns("Purpleshire"); customer.SetupGet(x => x.PostCode).Returns("M1 1AA"); customer.SetupGet(x => x.TelephoneNumber).Returns("01234 567890"); customer.SetupGet(x => x.Email).Returns("*****@*****.**"); _booking.SetupGet(x => x.Customer).Returns(customer.Object); _bookingControllerFactory.BookingService .Setup(x => x.SummarizeCustomerMake(It.IsAny <CustomerMakeBookingRequest>())) .Returns(_booking.Object); }