use of io.crnk.core.engine.internal.exception.ExceptionMapperRegistryTest.IllegalStateExceptionMapper in project crnk-framework by crnk-project.
the class SimpleModuleTest method testAddExceptionMapper.
@Test
public void testAddExceptionMapper() {
module.addExceptionMapper(new IllegalStateExceptionMapper());
Assert.assertEquals(1, module.getExceptionMapperLookups().size());
module.setupModule(context);
Assert.assertEquals(0, context.numResourceInformationBuilds);
Assert.assertEquals(0, context.numResourceLookups);
Assert.assertEquals(0, context.numFilters);
Assert.assertEquals(0, context.numJacksonModules);
Assert.assertEquals(0, context.numRepositories);
Assert.assertEquals(1, context.numExceptionMapperLookup);
}
Aggregations