Exemplo n.º 1
0
        public void WhenEventNull_ShouldThrowArgumentNullException()
        {
            // Arrange
            DroveCustomerToTrainStation @event = null;

            // Act
            Action act = () => _sut.Map(@event);

            // Assert
            act.Should().Throw <ArgumentNullException>();
        }
Exemplo n.º 2
0
        public CabRide Map(DroveCustomerToTrainStation @event)
        {
            if (@event == null)
            {
                throw new ArgumentNullException(nameof(@event));
            }

            return(new CabRide
            {
                Id = @event.CabRideId,
                CustomerId = @event.CustomerId,
                TimeOfArrival = @event.ArrivalTime
            });
        }
Exemplo n.º 3
0
        public void Initialize()
        {
            _sut = new CabRideMapper();

            _event = _fixture.Create <DroveCustomerToTrainStation>();
        }