X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Fimpl%2FXMLRouterFunctionTest.java;h=cc663438a2b5853727b6af25dab2c7a3607a383e;hb=3b2c669b25bfcb5a3c3f06ff9180d85143bebb2a;hp=5d84107255f75ada0bf3702282f28239c1c9ef4f;hpb=e52385618670b54a5c6a4f2fbfab381bef43a905;p=xmlrouter diff --git a/impl/src/test/java/org/wamblee/xmlrouter/impl/XMLRouterFunctionTest.java b/impl/src/test/java/org/wamblee/xmlrouter/impl/XMLRouterFunctionTest.java index 5d84107..cc66343 100644 --- a/impl/src/test/java/org/wamblee/xmlrouter/impl/XMLRouterFunctionTest.java +++ b/impl/src/test/java/org/wamblee/xmlrouter/impl/XMLRouterFunctionTest.java @@ -29,7 +29,6 @@ import org.junit.Test; import org.wamblee.general.SystemClock; import org.wamblee.xmlrouter.common.Id; import org.wamblee.xmlrouter.config.DocumentType; -import org.wamblee.xmlrouter.config.RouterConfig; import org.wamblee.xmlrouter.config.Transformation; import org.wamblee.xmlrouter.listener.EventInfo; import org.wamblee.xmlrouter.listener.EventListener; @@ -53,7 +52,7 @@ public class XMLRouterFunctionTest { EventListener logListener = new LoggingEventListener(Level.INFO); listener = spy(logListener); routerService = new XMLRouter(new SystemClock(), config, listener); - configService = new XMLRouterConfigService(config); + configService = new XMLRouterConfigService("app", config); source1 = mock(DOMSource.class); source2 = mock(DOMSource.class); @@ -63,7 +62,8 @@ public class XMLRouterFunctionTest { DocumentType type = mock(DocumentType.class); when(type.isInstance(any(DOMSource.class))).thenReturn(true); when(type.getName()).thenReturn(aType); - RouterConfig routerConfig = configService.emptyConfig(); + when(type.getId()).thenReturn(new Id(aType)); + RouterConfig routerConfig = configService.emptyConfig("app"); routerConfig.documentTypeConfig().add(type); return routerConfig; }