Search in sources :

Example 1 with CSIRESTException

use of ajsc.exceptions.CSIRESTException in project AJSC by att.

the class RESTExceptionUtilAndRefresheableRestErrorMapTest method setCaetParametersFromHttpCodeTest.

@Test
public void setCaetParametersFromHttpCodeTest() {
    CSIRESTException csir = RESTExceptionUtil.nativeRESTError(401, "red", "idk", "sup");
    assertEquals(401, csir.getHTTPErrorCode());
    csir = RESTExceptionUtil.nativeRESTError(403, "red", "idk", "sup");
    assertEquals(403, csir.getHTTPErrorCode());
    csir = RESTExceptionUtil.nativeRESTError(501, "red", "idk", "sup");
    assertEquals(501, csir.getHTTPErrorCode());
    csir = RESTExceptionUtil.nativeRESTError(503, "red", "idk", "sup");
    assertEquals(503, csir.getHTTPErrorCode());
    csir = RESTExceptionUtil.nativeRESTError(402, "red", "idk", "sup");
    assertEquals(402, csir.getHTTPErrorCode());
}
Also used : CSIRESTException(ajsc.exceptions.CSIRESTException) Test(org.junit.Test)

Aggregations

CSIRESTException (ajsc.exceptions.CSIRESTException)1 Test (org.junit.Test)1