public async Task SetWebProxyAsync_DoesNotThrowUriException() { Configuration configuration = new Configuration( Environment.DEVELOPMENT, "integration_merchant_id", "integration_public_key", "integration_private_key" ); configuration.WebProxy = new WebProxy("http://localhost:3000"); BraintreeService service = new BraintreeService(configuration); try { await service.GetAsync(service.MerchantPath() + "/non-existent-route"); Assert.Fail("Should have thrown exception"); } catch (System.UriFormatException) { Assert.Fail("Setting WebProxy should not throw a URI exception"); } catch (NotFoundException) { // expected } }