use of com.linkedin.r2.testutils.filter.RestCountFilter in project rest.li by linkedin.
the class TestFilterChainImpl method testRestRequestFilter.
@Test
public void testRestRequestFilter() {
final RestCountFilter restCountFilter = new RestCountFilter();
final StreamCountFilter streamCountFilter = new StreamCountFilter();
FilterChain fc = FilterChains.createRestChain(restCountFilter);
fc = fc.addLast(streamCountFilter);
fireRestRequest(fc);
assertRestCounts(1, 0, 0, restCountFilter);
assertStreamCounts(0, 0, 0, streamCountFilter);
}
use of com.linkedin.r2.testutils.filter.RestCountFilter in project rest.li by linkedin.
the class TestFilterChainImpl method testRestErrorFilter.
@Test
public void testRestErrorFilter() {
final RestCountFilter restCountFilter = new RestCountFilter();
final StreamCountFilter streamCountFilter = new StreamCountFilter();
FilterChain fc = FilterChains.createRestChain(restCountFilter);
fc = fc.addLast(streamCountFilter);
fireRestError(fc);
assertRestCounts(0, 0, 1, restCountFilter);
assertStreamCounts(0, 0, 0, streamCountFilter);
}
Aggregations