Search in sources :

Example 1 with HalRelationCacheConfigurationException

use of org.camunda.bpm.engine.rest.hal.cache.HalRelationCacheConfigurationException in project camunda-bpm-platform by camunda.

the class HalResourceCacheTest method testCacheInvalidParameterName.

@Test
public void testCacheInvalidParameterName() {
    HalRelationCacheConfiguration configuration = new HalRelationCacheConfiguration();
    configuration.setCacheImplementationClass(DefaultHalResourceCache.class);
    configuration.addCacheConfiguration(HalUser.class, Collections.<String, Object>singletonMap("unknown", "property"));
    try {
        contextListener.configureCaches(configuration);
        fail("Exception expected");
    } catch (HalRelationCacheConfigurationException e) {
        assertTrue(e.getMessage().contains("setter"));
    }
}
Also used : HalRelationCacheConfiguration(org.camunda.bpm.engine.rest.hal.cache.HalRelationCacheConfiguration) HalRelationCacheConfigurationException(org.camunda.bpm.engine.rest.hal.cache.HalRelationCacheConfigurationException) Test(org.junit.Test) AbstractRestServiceTest(org.camunda.bpm.engine.rest.AbstractRestServiceTest)

Aggregations

AbstractRestServiceTest (org.camunda.bpm.engine.rest.AbstractRestServiceTest)1 HalRelationCacheConfiguration (org.camunda.bpm.engine.rest.hal.cache.HalRelationCacheConfiguration)1 HalRelationCacheConfigurationException (org.camunda.bpm.engine.rest.hal.cache.HalRelationCacheConfigurationException)1 Test (org.junit.Test)1