public void ThrowExceptionIfErrorStatusCodeIsUpgradeRequired() { try { BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)426, null); Assert.Fail("Expected an AuthenticationException but none was thrown."); } catch (Braintree.Exceptions.UpgradeRequiredException) { // expected } }
public void ThrowExceptionIfErrorStatusCodeIsDownForMaintenance() { BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)503, null); }
public void ThrowExceptionIfErrorStatusCodeIsTooManyRequests() { BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)429, null); }
public void ThrowExceptionIfErrorStatusCodeIsUpgradeRequired() { BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)426, null); }
public void ThrowExceptionIfErrorStatusCodeIsDownForMaintenance() { Assert.Throws <DownForMaintenanceException> (() => BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)503, null)); }
public void ThrowExceptionIfErrorStatusCodeIsTooManyRequests() { Assert.Throws <TooManyRequestsException>(() => BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)429, null)); }
public void ThrowExceptionIfErrorStatusCodeIsUpgradeRequired() { Assert.Throws <UpgradeRequiredException>(() => BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)426, null)); }
public void ThrowExceptionIfErrorStatusCodeIsServiceUnavailable() { Assert.Throws <ServiceUnavailableException> (() => BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)503, null)); }
public void ThrowExceptionIfErrorStatusCodeIsGatewayTimeout() { Assert.Throws <GatewayTimeoutException> (() => BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)504, null)); }
public void ThrowExceptionIfErrorStatusCodeIsInternalServerError() { Assert.Throws <ServerException>(() => BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)500, null)); }
public void ThrowExceptionIfErrorStatusCodeIsRequestTimeout() { Assert.Throws <RequestTimeoutException>(() => BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)408, null)); }
public void ThrowExceptionIfErrorStatusCodeIsNotFound() { Assert.Throws <NotFoundException>(() => BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)404, null)); }
public void ThrowExceptionIfErrorStatusCodeIsForbidden() { Assert.Throws <AuthorizationException>(() => BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)403, null)); }
public void ThrowExceptionIfErrorStatusCodeIsUnauthorized() { Assert.Throws <AuthenticationException>(() => BraintreeService.ThrowExceptionIfErrorStatusCode((HttpStatusCode)401, null)); }