use of org.glassfish.jersey.test.util.runner.RunSeparately in project jersey by jersey.
the class HelloWorldTest method testLoggingFilterTargetClass.
@Test
@RunSeparately
public void testLoggingFilterTargetClass() {
WebTarget target = target().path(App.ROOT_PATH);
target.register(CustomLoggingFilter.class).property("foo", "bar");
CustomLoggingFilter.preFilterCalled = CustomLoggingFilter.postFilterCalled = 0;
String s = target.request().get(String.class);
assertEquals(HelloWorldResource.CLICHED_MESSAGE, s);
assertEquals(1, CustomLoggingFilter.preFilterCalled);
assertEquals(1, CustomLoggingFilter.postFilterCalled);
}
use of org.glassfish.jersey.test.util.runner.RunSeparately in project jersey by jersey.
the class HelloWorldTest method testLoggingFilterClientInstance.
@Test
@RunSeparately
public void testLoggingFilterClientInstance() {
Client client = client();
client.register(new CustomLoggingFilter()).property("foo", "bar");
CustomLoggingFilter.preFilterCalled = CustomLoggingFilter.postFilterCalled = 0;
String s = target().path(App.ROOT_PATH).request().get(String.class);
assertEquals(HelloWorldResource.CLICHED_MESSAGE, s);
assertEquals(1, CustomLoggingFilter.preFilterCalled);
assertEquals(1, CustomLoggingFilter.postFilterCalled);
}
use of org.glassfish.jersey.test.util.runner.RunSeparately in project jersey by jersey.
the class HelloWorldTest method testLoggingFilterClientClass.
@Test
@RunSeparately
public void testLoggingFilterClientClass() {
Client client = client();
client.register(CustomLoggingFilter.class).property("foo", "bar");
CustomLoggingFilter.preFilterCalled = CustomLoggingFilter.postFilterCalled = 0;
String s = target().path(App.ROOT_PATH).request().get(String.class);
assertEquals(HelloWorldResource.CLICHED_MESSAGE, s);
assertEquals(1, CustomLoggingFilter.preFilterCalled);
assertEquals(1, CustomLoggingFilter.postFilterCalled);
}
use of org.glassfish.jersey.test.util.runner.RunSeparately in project jersey by jersey.
the class HelloWorldTest method testLoggingFilterTargetClass.
@Test
@RunSeparately
public void testLoggingFilterTargetClass() {
WebTarget target = target().path(App.ROOT_PATH);
target.register(CustomLoggingFilter.class).property("foo", "bar");
CustomLoggingFilter.preFilterCalled = CustomLoggingFilter.postFilterCalled = 0;
String s = target.request().get(String.class);
assertEquals(HelloWorldResource.CLICHED_MESSAGE, s);
assertEquals(1, CustomLoggingFilter.preFilterCalled);
assertEquals(1, CustomLoggingFilter.postFilterCalled);
}
use of org.glassfish.jersey.test.util.runner.RunSeparately in project jersey by jersey.
the class HelloWorldTest method testLoggingFilterTargetInstance.
@Test
@RunSeparately
public void testLoggingFilterTargetInstance() {
WebTarget target = target().path(App.ROOT_PATH);
target.register(new CustomLoggingFilter()).property("foo", "bar");
CustomLoggingFilter.preFilterCalled = CustomLoggingFilter.postFilterCalled = 0;
String s = target.request().get(String.class);
assertEquals(HelloWorldResource.CLICHED_MESSAGE, s);
assertEquals(1, CustomLoggingFilter.preFilterCalled);
assertEquals(1, CustomLoggingFilter.postFilterCalled);
}
Aggregations