Skip to content

Commit

Permalink
[RESTEASY-1591] Test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
asoldano committed Feb 2, 2017
1 parent 1e755ef commit d03e2fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
@@ -1,9 +1,12 @@
package org.jboss.resteasy.test.interceptor;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.test.api.RunAsClient;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.jboss.resteasy.test.interceptor.resource.CustomException;
import org.jboss.resteasy.test.interceptor.resource.ThrowCustomExceptionResponseFilter;
import org.jboss.resteasy.utils.PortProviderUtil;
Expand All @@ -15,14 +18,10 @@
import org.junit.Test;
import org.junit.runner.RunWith;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;

/**
* @tpSubChapter Interceptors
* @tpChapter Integration tests
* @tpSince RESTEasy 3.0.20
* @tpSince RESTEasy 3.0.21
* @tpTestCaseDetails Throw custom exception from a ClientResponseFilter [RESTEASY-1591]
*/
@RunWith(Arquillian.class)
Expand Down Expand Up @@ -53,12 +52,10 @@ private String generateURL(String path) {
}
/**
* @tpTestDetails Use ClientResponseFilter
* @tpSince RESTEasy 3.1.0
* @tpSince RESTEasy 3.0.21
*/
@Test(expected = CustomException.class)
public void testThrowCustomException() throws Exception {
ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance();
factory.register(ThrowCustomExceptionResponseFilter.class);
client.register(ThrowCustomExceptionResponseFilter.class);
client.target(generateURL("/testCustomException")).request().post(Entity.text("testCustomException"));
}
Expand Down
Expand Up @@ -120,7 +120,7 @@ public void AnnotationFilterTest() {
* The request is processed by registered filter before it is send to the server. Filter aborts processing
* by throwing a custom exception, which should not be wrapped in a ProcessingException. [RESTEASY-1591]
* @tpPassCrit Expected Exception is thrown from the Client
* @tpSince RESTEasy 3.0.20
* @tpSince RESTEasy 3.0.21
*/
@Test(expected = ClientCustomException.class)
public void ThrowCustomExceptionFilterTest() {
Expand Down

0 comments on commit d03e2fc

Please sign in to comment.