use of jakarta.ws.rs.ForbiddenException in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method constructorStringResponseTest.
/*
* @testName: constructorStringResponseTest
*
* @assertion_ids: JAXRS:JAVADOC:1067; JAXRS:JAVADOC:12;
*
* @test_Strategy: Construct a new "forbidden" exception. getResponse
*/
@Test
public void constructorStringResponseTest() throws Fault {
Response response = buildResponse();
ForbiddenException e = new ForbiddenException(MESSAGE, response);
assertResponse(e, HOST);
assertMessage(e);
}
use of jakarta.ws.rs.ForbiddenException in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method constructorStringTest.
/*
* @testName: constructorStringTest
*
* @assertion_ids: JAXRS:JAVADOC:1066; JAXRS:JAVADOC:12;
*
* @test_Strategy: Construct a new "forbidden" exception. getResponse
*/
@Test
public void constructorStringTest() throws Fault {
ForbiddenException e = new ForbiddenException(MESSAGE);
assertResponse(e);
assertMessage(e);
}
use of jakarta.ws.rs.ForbiddenException in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method constructorStringThrowableTest.
/*
* @testName: constructorStringThrowableTest
*
* @assertion_ids: JAXRS:JAVADOC:1068; JAXRS:JAVADOC:12;
*
* @test_Strategy: Construct a new "forbidden" exception. cause - the
* underlying cause of the exception.
*
* getResponse
*/
@Test
public void constructorStringThrowableTest() throws Fault {
Throwable[] throwables = new Throwable[] { new RuntimeException(), new IOException(), new Error(), new Throwable() };
for (Throwable t : throwables) {
ForbiddenException e = new ForbiddenException(MESSAGE, t);
assertResponse(e);
assertCause(e, t);
assertMessage(e);
}
}
use of jakarta.ws.rs.ForbiddenException in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method constructorResponseTest.
/*
* @testName: constructorResponseTest
*
* @assertion_ids: JAXRS:JAVADOC:971; JAXRS:JAVADOC:12;
*
* @test_Strategy: Construct a new "forbidden" exception.
* java.lang.IllegalArgumentException - in case the status code set in the
* response is not HTTP 403.
*
* getResponse
*/
@Test
public void constructorResponseTest() throws Fault {
Response response = buildResponse();
ForbiddenException e = new ForbiddenException(response);
assertResponse(e, HOST);
}
use of jakarta.ws.rs.ForbiddenException in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method constructorStringResponseThrowableTest.
/*
* @testName: constructorStringResponseThrowableTest
*
* @assertion_ids: JAXRS:JAVADOC:1069; JAXRS:JAVADOC:12;
*
* @test_Strategy: Construct a new "forbidden" exception.
*
* getResponse
*/
@Test
public void constructorStringResponseThrowableTest() throws Fault {
Response response = buildResponse();
Throwable[] throwables = new Throwable[] { new RuntimeException(), new IOException(), new Error(), new Throwable() };
for (Throwable t : throwables) {
ForbiddenException e = new ForbiddenException(MESSAGE, response, t);
assertResponse(e, HOST);
assertCause(e, t);
assertMessage(e);
}
}
Aggregations