Пример #1
0
        public async Task WhenSuccess_ShouldRaiseDroveCustomerToTrainStationEvent()
        {
            // Arrange
            var command = _fixture.Create <DriveCustomerToTrainStation>();

            // Act
            await _sut.Handle(command);

            // Assert
            await _messageBus
            .Received(1)
            .Enqueue(Arg.Any <DroveCustomerToTrainStation>());
        }
Пример #2
0
        public async Task WhenDriveCustomerToTrainStation_ShouldDroveCustomerToTrainStation()
        {
            // Arrange
            var message = _fixture.Create <DriveCustomerToTrainStation>();

            // Act
            await _sut.Handle(message);

            // Assert
            await _bus
            .Received(1)
            .Send(Arg.Any <DroveCustomerToTrainStation>());
        }