public void Null_response_means_address_is_invalid()
        {
            var stub = new Mock <ILocationsApiGateway>();

            stub.Setup(x => x.GetCoordinatesByAddress(It.IsAny <string>()))
            .Returns((LocationsClientResponse)null);
            var api = new LocationsApi(stub.Object);

            Result <Coordinates> result = api.GetCoordinatesByAddress("Address");

            result.IsSuccess.Should().BeFalse();
            result.Error.Should().Be("No latitude / longitude available for the address 'Address'");
        }
Beispiel #2
0
 public DeliveryController(
     ILocationsApiGateway locationsApiGateway, IMessageBusGateway messageBusGateway)
 {
     _locationsApi = new LocationsApi(locationsApiGateway);
     _messageBus   = new MessageBus(messageBusGateway);
 }