public void WhenEventNull_ShouldThrowArgumentNullException() { // Arrange DroveCustomerToTrainStation @event = null; // Act Action act = () => _sut.Map(@event); // Assert act.Should().Throw <ArgumentNullException>(); }
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 }); }
public void Initialize() { _sut = new CabRideMapper(); _event = _fixture.Create <DroveCustomerToTrainStation>(); }