Search in sources :

Example 1 with IllegalStateExceptionMapper

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);
}
Also used : IllegalStateExceptionMapper(io.crnk.core.engine.internal.exception.ExceptionMapperRegistryTest.IllegalStateExceptionMapper) Test(org.junit.Test)

Aggregations

IllegalStateExceptionMapper (io.crnk.core.engine.internal.exception.ExceptionMapperRegistryTest.IllegalStateExceptionMapper)1 Test (org.junit.Test)1