Example #1
0
        public void Map_WhenMappingFromPayLoadCreatedEventToCreatePayLoadResponse_ShouldMapAsExpected(IMapper sut,
                                                                                                      PayLoadCreatedEvent payLoadCreatedEvent)
        {
            var result = sut.Map <CreatePayLoadResponse>(payLoadCreatedEvent);

            result.Content.Should().BeEquivalentTo(payLoadCreatedEvent.Content);
            result.CorrelationId.Should().Be(result.CorrelationId);
            result.Id.Should().Be(result.Id);
        }
        public void Handle_OnPayLoadCreatedEvent_ShouldAddItToEventList(PayLoadCreatedEvent @event)
        {
            _sut.Handle(@event, new CancellationToken());

            _sut.GetEvent <PayLoadCreatedEvent>().Should().Be(@event);
        }
Example #3
0
        public void Handle_WhenPayLoadCreated_ShouldSendAnalyzeDiffCommand(PayLoadCreatedEvent payLoadCreatedEvent)
        {
            _sut.Handle(payLoadCreatedEvent, new CancellationToken());

            _bus.Received(1).SendCommand(Arg.Is <AnalyzeDiffCommand>(a => a.CorrelationId == payLoadCreatedEvent.CorrelationId));
        }