public void AcceptReturnsCorrectResult(MakeReservationCommand sut)
        {
            var expected = sut.AsSource().OfLikeness <ReservationAcceptedEvent>();
            ReservationAcceptedEvent result = sut.Accept();

            expected.ShouldEqual(result);
        }
        public void ConsumePublishesEvent([Frozen] Mock <IChannel> channelMock, AcceptingReservationConsumer sut, MakeReservationCommand cmd)
        {
            var expectedEvent = cmd.Accept().AsSource().OfLikeness <ReservationAcceptedEvent>();

            sut.Consume(cmd);
            channelMock.Verify(c => c.Send(expectedEvent));
        }
Esempio n. 3
0
        public void ConsumeAddsReservationToRepository([Frozen] Mock <IReservationRepository> repositoryMock, ReservationWriter sut, MakeReservationCommand cmd)
        {
            var expectedReseveration = cmd.Accept().AsSource().OfLikeness <ReservationAcceptedEvent>();

            sut.Consume(cmd);
            repositoryMock.Verify(r => r.AddReservation(It.Is <ReservationAcceptedEvent>(e => expectedReseveration.Equals(e))));
        }
 public void ConsumePublishesEvent([Frozen]Mock<IChannel> channelMock, AcceptingReservationConsumer sut, MakeReservationCommand cmd)
 {
     var expectedEvent = cmd.Accept().AsSource().OfLikeness<ReservationAcceptedEvent>();
     sut.Consume(cmd);
     channelMock.Verify(c => c.Send(expectedEvent));
 }