public void ConstructorShouldFailWhenTransportTypeOdataProviderIsNull()
        {
            // Arrange
            var mapper = new Mock <IMapper>().Object;
            var transportTypeReadRepository = new Mock <ITransportTypeReadRepository>().Object;
            ITransportTypeOdataProvider transportTypeOdataProvider = null;

            // Act
            Action ctor = () =>
            {
                new ListTransportTypeQueryHandler(mapper, transportTypeReadRepository, transportTypeOdataProvider);
            };

            // Assert
            ctor.Should().Throw <ArgumentNullException>();
        }
예제 #2
0
 public ListTransportTypeQueryHandler(IMapper mapper, ITransportTypeReadRepository transportTypeReadRepository, ITransportTypeOdataProvider transportTypeOdataProvider)
 {
     _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _transportTypeReadRepository = transportTypeReadRepository ?? throw new ArgumentNullException(nameof(transportTypeReadRepository));
     _transportTypeOdataProvider  = transportTypeOdataProvider ?? throw new ArgumentNullException(nameof(transportTypeOdataProvider));
 }