Search in sources :

Example 1 with CodedExceptionEventHandler

use of org.n52.iceland.statistics.impl.handlers.exceptions.CodedExceptionEventHandler in project arctic-sea by 52North.

the class EventHandlerFinderTest method findSubclassAsHandler.

@Test
public void findSubclassAsHandler() {
    Map<String, StatisticsServiceEventHandler<?>> handlers = new HashMap<>();
    CodedExceptionEventHandler handler = new CodedExceptionEventHandler();
    OperationNotSupportedException exception = new OperationNotSupportedException("GetCapabilities");
    handlers.put("CodedException", handler);
    Assert.assertNotNull(EventHandlerFinder.findHandler(exception, handlers));
}
Also used : OperationNotSupportedException(org.n52.shetland.ogc.ows.exception.OperationNotSupportedException) HashMap(java.util.HashMap) CodedExceptionEventHandler(org.n52.iceland.statistics.impl.handlers.exceptions.CodedExceptionEventHandler) StatisticsServiceEventHandler(org.n52.iceland.statistics.api.interfaces.StatisticsServiceEventHandler) Test(org.junit.Test)

Aggregations

HashMap (java.util.HashMap)1 Test (org.junit.Test)1 StatisticsServiceEventHandler (org.n52.iceland.statistics.api.interfaces.StatisticsServiceEventHandler)1 CodedExceptionEventHandler (org.n52.iceland.statistics.impl.handlers.exceptions.CodedExceptionEventHandler)1 OperationNotSupportedException (org.n52.shetland.ogc.ows.exception.OperationNotSupportedException)1