public void NewBookingPostCorrectlySendsOnChannel([Frozen]Mock<IChannel> channelMock, HomeController sut, BookingViewModel model) { sut.NewBooking(model); var expected = model.AsSource().OfLikeness<MakeReservationCommand>().Without(d => d.Id); channelMock.Verify(c => c.Send(expected)); }
public void MakeNewReservationReturnsCorrectResult(BookingViewModel sut) { MakeReservationCommand result = sut.MakeNewReservation(); var expected = sut.AsSource().OfLikeness<MakeReservationCommand>().Without(d => d.Id); expected.ShouldEqual(result); }