From e4d5f9623f48a8f15350c07d47db73afb698ad3a Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Thu, 13 Feb 2014 22:20:56 +0100 Subject: [PATCH] [Bugfix] fixed bug where InMemory realms were not separated InMemoryPersistenceHandler did not keep separate DAOs for each realm, so that the realms were not separated in memory --- .../strolch/agent/api/ComponentContainer.java | 17 +++- .../strolch/agent/api/ElementMapHandler.java | 20 +++- .../agent/impl/AbstractElementMapHandler.java | 10 +- .../agent/impl/ComponentContainerImpl.java | 13 +-- .../persistence/api/AbstractTransaction.java | 5 + .../persistence/api/StrolchTransaction.java | 2 + .../inmemory/InMemoryPersistenceHandler.java | 50 ++++++++-- .../ComponentContainerTest.java | 91 ++++++++++++++++--- src/test/java/li/strolch/agent/RealmTest.java | 43 +++++++++ .../ConfigurationParserTest.java | 10 +- .../ControllerDependencyTest.java | 2 +- .../model/PostInitializerTest.java | 2 +- .../model/PostInitializerTestImpl.java | 2 +- .../model/ResourceGeneratorHandlerTest.java | 2 +- .../ResourceGeneratorHandlerTestImpl.java | 2 +- .../model/ServiceHandlerTest.java | 2 +- .../model/ServiceHandlerTestImpl.java | 2 +- .../model/ServiceResultTest.java | 2 +- .../query/enums/EnumHandlerTest.java | 4 +- .../query/inmemory/FindByLocatorTest.java | 7 +- .../query/inmemory/InMemoryQueryTest.java | 2 +- .../{test => }/query/inmemory/QueryTest.java | 40 ++++---- .../config/StrolchConfiguration.xml | 8 +- .../config/StrolchConfiguration.xml | 4 +- .../emptytest/config/StrolchConfiguration.xml | 8 +- .../realmtest/config/StrolchConfiguration.xml | 18 ++-- .../{StrolchModel.xml => DefaultRealm.xml} | 0 src/test/resources/realmtest/data/MyRealm.xml | 25 +++++ .../resources/realmtest/data/OtherRealm.xml | 25 +++++ .../config/StrolchConfiguration.xml | 8 +- .../config/StrolchConfiguration.xml | 12 +-- 31 files changed, 328 insertions(+), 110 deletions(-) rename src/test/java/li/strolch/{runtime/test/component => agent}/ComponentContainerTest.java (70%) create mode 100644 src/test/java/li/strolch/agent/RealmTest.java rename src/test/java/li/strolch/runtime/{test/component => configuration}/ConfigurationParserTest.java (92%) rename src/test/java/li/strolch/runtime/{test/component => configuration}/ControllerDependencyTest.java (99%) rename src/test/java/li/strolch/runtime/{test/component => configuration}/model/PostInitializerTest.java (93%) rename src/test/java/li/strolch/runtime/{test/component => configuration}/model/PostInitializerTestImpl.java (95%) rename src/test/java/li/strolch/runtime/{test/component => configuration}/model/ResourceGeneratorHandlerTest.java (94%) rename src/test/java/li/strolch/runtime/{test/component => configuration}/model/ResourceGeneratorHandlerTestImpl.java (95%) rename src/test/java/li/strolch/runtime/{test/component => configuration}/model/ServiceHandlerTest.java (93%) rename src/test/java/li/strolch/runtime/{test/component => configuration}/model/ServiceHandlerTestImpl.java (95%) rename src/test/java/li/strolch/runtime/{test/component => configuration}/model/ServiceResultTest.java (94%) rename src/test/java/li/strolch/runtime/{test => }/query/enums/EnumHandlerTest.java (95%) rename src/test/java/li/strolch/runtime/{test => }/query/inmemory/FindByLocatorTest.java (91%) rename src/test/java/li/strolch/runtime/{test => }/query/inmemory/InMemoryQueryTest.java (99%) rename src/test/java/li/strolch/runtime/{test => }/query/inmemory/QueryTest.java (82%) rename src/test/resources/realmtest/data/{StrolchModel.xml => DefaultRealm.xml} (100%) create mode 100644 src/test/resources/realmtest/data/MyRealm.xml create mode 100644 src/test/resources/realmtest/data/OtherRealm.xml diff --git a/src/main/java/li/strolch/agent/api/ComponentContainer.java b/src/main/java/li/strolch/agent/api/ComponentContainer.java index d60e0b63c..e14da2141 100644 --- a/src/main/java/li/strolch/agent/api/ComponentContainer.java +++ b/src/main/java/li/strolch/agent/api/ComponentContainer.java @@ -19,6 +19,8 @@ import java.util.Set; import li.strolch.agent.impl.DataStoreMode; import li.strolch.agent.impl.StrolchRealm; +import li.strolch.exception.StrolchException; +import li.strolch.runtime.StrolchConstants; /** * @author Robert von Burg @@ -34,13 +36,22 @@ public interface ComponentContainer { public abstract boolean hasComponent(Class clazz); public abstract T getComponent(Class clazz); - + public abstract Set> getComponentTypes(); public abstract Set getRealmNames(); - public abstract StrolchRealm getDefaultRealm(); - + /** + * Returns the {@link StrolchRealm} with the given name. To get the default realm, use the constante + * {@link StrolchConstants#DEFAULT_REALM}. + * + * @param realm + * the name of the {@link StrolchRealm} to return + * @return the {@link StrolchRealm} with the given name + * + * @throws StrolchException + * if the {@link StrolchRealm} does not exist with the given name + */ public abstract StrolchRealm getRealm(String realm); } \ No newline at end of file diff --git a/src/main/java/li/strolch/agent/api/ElementMapHandler.java b/src/main/java/li/strolch/agent/api/ElementMapHandler.java index e54ae8629..06cddc9a8 100644 --- a/src/main/java/li/strolch/agent/api/ElementMapHandler.java +++ b/src/main/java/li/strolch/agent/api/ElementMapHandler.java @@ -18,15 +18,31 @@ package li.strolch.agent.api; import java.util.Set; import li.strolch.agent.impl.StrolchRealm; +import li.strolch.exception.StrolchException; +import li.strolch.runtime.StrolchConstants; /** * @author Robert von Burg */ public interface ElementMapHandler { + /** + * Returns the names of the configured {@link StrolchRealm StrolchRealms} + * + * @return the set of names of the configured {@link StrolchRealm StrolchRealms} + */ public Set getRealmNames(); - public StrolchRealm getDefaultRealm(); - + /** + * Returns the {@link StrolchRealm} with the given name. To get the default realm, use the constante + * {@link StrolchConstants#DEFAULT_REALM}. + * + * @param realm + * the name of the {@link StrolchRealm} to return + * @return the {@link StrolchRealm} with the given name + * + * @throws StrolchException + * if the {@link StrolchRealm} does not exist with the given name + */ public StrolchRealm getRealm(String realm); } diff --git a/src/main/java/li/strolch/agent/impl/AbstractElementMapHandler.java b/src/main/java/li/strolch/agent/impl/AbstractElementMapHandler.java index e5e163740..5c5e5a30a 100644 --- a/src/main/java/li/strolch/agent/impl/AbstractElementMapHandler.java +++ b/src/main/java/li/strolch/agent/impl/AbstractElementMapHandler.java @@ -20,12 +20,11 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import ch.eitchnet.utils.dbc.DBC; import li.strolch.agent.api.ComponentContainer; import li.strolch.agent.api.ElementMapHandler; import li.strolch.agent.api.StrolchComponent; import li.strolch.exception.StrolchException; -import li.strolch.runtime.StrolchConstants; +import ch.eitchnet.utils.dbc.DBC; /** * @author Robert von Burg @@ -48,12 +47,7 @@ public abstract class AbstractElementMapHandler extends StrolchComponent impleme } @Override - public StrolchRealm getDefaultRealm() { - return getRealm(StrolchConstants.DEFAULT_REALM); - } - - @Override - public StrolchRealm getRealm(String realm) { + public StrolchRealm getRealm(String realm) throws StrolchException { DBC.PRE.assertNotEmpty("Realm name must be set!", realm); StrolchRealm strolchRealm = this.realms.get(realm); if (strolchRealm == null) { diff --git a/src/main/java/li/strolch/agent/impl/ComponentContainerImpl.java b/src/main/java/li/strolch/agent/impl/ComponentContainerImpl.java index a3067581e..705e06b9b 100644 --- a/src/main/java/li/strolch/agent/impl/ComponentContainerImpl.java +++ b/src/main/java/li/strolch/agent/impl/ComponentContainerImpl.java @@ -27,7 +27,7 @@ import li.strolch.agent.api.ComponentState; import li.strolch.agent.api.ElementMapHandler; import li.strolch.agent.api.StrolchAgent; import li.strolch.agent.api.StrolchComponent; -import li.strolch.runtime.StrolchConstants; +import li.strolch.exception.StrolchException; import li.strolch.runtime.configuration.ComponentConfiguration; import li.strolch.runtime.configuration.StrolchConfiguration; import li.strolch.runtime.configuration.StrolchConfigurationException; @@ -97,12 +97,7 @@ public class ComponentContainerImpl implements ComponentContainer { } @Override - public StrolchRealm getDefaultRealm() { - return getRealm(StrolchConstants.DEFAULT_REALM); - } - - @Override - public StrolchRealm getRealm(String realm) { + public StrolchRealm getRealm(String realm) throws StrolchException { return getComponent(ElementMapHandler.class).getRealm(realm); } @@ -130,8 +125,8 @@ public class ComponentContainerImpl implements ComponentContainer { @SuppressWarnings("unchecked") Class strolchComponentClass = (Class) implClass; - Constructor constructor = strolchComponentClass.getConstructor( - ComponentContainer.class, String.class); + Constructor constructor = strolchComponentClass.getConstructor(ComponentContainer.class, + String.class); StrolchComponent strolchComponent = constructor.newInstance(this, componentName); componentMap.put(apiClass, strolchComponent); diff --git a/src/main/java/li/strolch/persistence/api/AbstractTransaction.java b/src/main/java/li/strolch/persistence/api/AbstractTransaction.java index f5b5785f8..233ea6548 100644 --- a/src/main/java/li/strolch/persistence/api/AbstractTransaction.java +++ b/src/main/java/li/strolch/persistence/api/AbstractTransaction.java @@ -45,6 +45,11 @@ public abstract class AbstractTransaction implements StrolchTransaction { protected static final Logger logger = LoggerFactory.getLogger(InMemoryTransaction.class); private StrolchRealm realm; + @Override + public String getRealmName() { + return this.realm.getRealm(); + } + /** * @param realm */ diff --git a/src/main/java/li/strolch/persistence/api/StrolchTransaction.java b/src/main/java/li/strolch/persistence/api/StrolchTransaction.java index 6045b9cbb..f8c9a22d7 100644 --- a/src/main/java/li/strolch/persistence/api/StrolchTransaction.java +++ b/src/main/java/li/strolch/persistence/api/StrolchTransaction.java @@ -31,6 +31,8 @@ import li.strolch.model.query.ResourceQuery; public interface StrolchTransaction extends AutoCloseable { + public String getRealmName(); + public void setCloseStrategy(TransactionCloseStrategy closeStrategy); public void autoCloseableCommit(); diff --git a/src/main/java/li/strolch/persistence/inmemory/InMemoryPersistenceHandler.java b/src/main/java/li/strolch/persistence/inmemory/InMemoryPersistenceHandler.java index e02bd5089..8992cd564 100644 --- a/src/main/java/li/strolch/persistence/inmemory/InMemoryPersistenceHandler.java +++ b/src/main/java/li/strolch/persistence/inmemory/InMemoryPersistenceHandler.java @@ -1,5 +1,8 @@ package li.strolch.persistence.inmemory; +import java.util.HashMap; +import java.util.Map; + import li.strolch.agent.api.ComponentContainer; import li.strolch.agent.api.StrolchComponent; import li.strolch.agent.impl.StrolchRealm; @@ -7,11 +10,11 @@ import li.strolch.persistence.api.OrderDao; import li.strolch.persistence.api.PersistenceHandler; import li.strolch.persistence.api.ResourceDao; import li.strolch.persistence.api.StrolchTransaction; +import li.strolch.runtime.configuration.ComponentConfiguration; public class InMemoryPersistenceHandler extends StrolchComponent implements PersistenceHandler { - private OrderDao orderDao; - private ResourceDao resourceDao; + private Map daoCache; public InMemoryPersistenceHandler(ComponentContainer container, String componentName) { super(container, componentName); @@ -22,17 +25,48 @@ public class InMemoryPersistenceHandler extends StrolchComponent implements Pers return new InMemoryTransaction(realm, this); } + @Override + public void initialize(ComponentConfiguration configuration) { + super.initialize(configuration); + this.daoCache = new HashMap<>(); + } + @Override public OrderDao getOrderDao(StrolchTransaction tx) { - if (this.orderDao == null) - this.orderDao = new InMemoryOrderDao(); - return this.orderDao; + DaoCache daoCache = getDaoCache(tx); + return daoCache.getOrderDao(); } @Override public ResourceDao getResourceDao(StrolchTransaction tx) { - if (this.resourceDao == null) - this.resourceDao = new InMemoryResourceDao(); - return this.resourceDao; + DaoCache daoCache = getDaoCache(tx); + return daoCache.getResourceDao(); + } + + private synchronized DaoCache getDaoCache(StrolchTransaction tx) { + DaoCache daoCache = this.daoCache.get(tx.getRealmName()); + if (daoCache == null) { + daoCache = new DaoCache(new InMemoryOrderDao(), new InMemoryResourceDao()); + this.daoCache.put(tx.getRealmName(), daoCache); + } + return daoCache; + } + + private class DaoCache { + private OrderDao orderDao; + private ResourceDao resourceDao; + + public DaoCache(OrderDao orderDao, ResourceDao resourceDao) { + this.orderDao = orderDao; + this.resourceDao = resourceDao; + } + + public OrderDao getOrderDao() { + return this.orderDao; + } + + public ResourceDao getResourceDao() { + return this.resourceDao; + } } } diff --git a/src/test/java/li/strolch/runtime/test/component/ComponentContainerTest.java b/src/test/java/li/strolch/agent/ComponentContainerTest.java similarity index 70% rename from src/test/java/li/strolch/runtime/test/component/ComponentContainerTest.java rename to src/test/java/li/strolch/agent/ComponentContainerTest.java index dcf11e864..c0f8fc4c6 100644 --- a/src/test/java/li/strolch/runtime/test/component/ComponentContainerTest.java +++ b/src/test/java/li/strolch/agent/ComponentContainerTest.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.component; +package li.strolch.agent; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; import java.io.File; import java.text.MessageFormat; @@ -31,10 +32,11 @@ import li.strolch.model.Resource; import li.strolch.persistence.api.OrderDao; import li.strolch.persistence.api.ResourceDao; import li.strolch.persistence.api.StrolchTransaction; +import li.strolch.runtime.StrolchConstants; import li.strolch.runtime.configuration.RuntimeConfiguration; -import li.strolch.runtime.test.component.model.ResourceGeneratorHandlerTest; -import li.strolch.runtime.test.component.model.ServiceHandlerTest; -import li.strolch.runtime.test.component.model.ServiceResultTest; +import li.strolch.runtime.configuration.model.ResourceGeneratorHandlerTest; +import li.strolch.runtime.configuration.model.ServiceHandlerTest; +import li.strolch.runtime.configuration.model.ServiceResultTest; import org.junit.Test; import org.slf4j.Logger; @@ -57,7 +59,8 @@ public class ComponentContainerTest { public static final String PATH_CACHED_RUNTIME = "target/cachedtest/"; public static final String PATH_EMPTY_RUNTIME = "target/emptytest/"; - private static final Logger logger = LoggerFactory.getLogger(ComponentContainerTest.class); + public static final Logger logger = LoggerFactory.getLogger(ComponentContainerTest.class); + private static final String TARGET = "target"; //$NON-NLS-1$ @Test @@ -127,7 +130,21 @@ public class ComponentContainerTest { } } - private static void testContainer(StrolchAgent agent) { + @Test + public void shouldTestRealms() { + + try { + StrolchAgent agent = startContainer(PATH_REALM_RUNTIME, PATH_REALM_CONTAINER); + testContainer(agent); + testRealms(agent); + destroyContainer(agent); + } catch (Exception e) { + logger.error(e.getMessage(), e); + throw e; + } + } + + public static void testContainer(StrolchAgent agent) { ComponentContainer container = agent.getContainer(); @@ -142,7 +159,7 @@ public class ComponentContainerTest { assertEquals("@testRes", resource.getId()); } - private static void testPersistenceContainer(StrolchAgent agent) { + public static void testPersistenceContainer(StrolchAgent agent) { ComponentContainer container = agent.getContainer(); @@ -150,7 +167,7 @@ public class ComponentContainerTest { ServiceResultTest result = serviceHandler.doService(); assertEquals(1, result.getResult()); - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { ResourceDao resourceDao = tx.getPersistenceHandler().getResourceDao(tx); resourceDao.save(ModelGenerator.createResource("@testRes0", "Test Res", "Test")); Resource queriedRes = resourceDao.queryBy("Test", "@testRes0"); @@ -158,7 +175,7 @@ public class ComponentContainerTest { assertEquals("@testRes0", queriedRes.getId()); } - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { OrderDao orderDao = tx.getPersistenceHandler().getOrderDao(tx); orderDao.save(ModelGenerator.createOrder("@testOrder0", "Test Order", "Test")); Order queriedOrder = orderDao.queryBy("Test", "@testOrder0"); @@ -167,11 +184,11 @@ public class ComponentContainerTest { } } - private static void testElementMaps(StrolchAgent agent) { + public static void testElementMaps(StrolchAgent agent) { ComponentContainer container = agent.getContainer(); - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { ResourceMap resourceMap = tx.getResourceMap(); resourceMap.add(tx, ModelGenerator.createResource("@testRes1", "Test Res", "Test")); Resource queriedRes = resourceMap.getBy(tx, "Test", "@testRes1"); @@ -179,7 +196,7 @@ public class ComponentContainerTest { assertEquals("@testRes1", queriedRes.getId()); } - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { OrderMap orderMap = tx.getOrderMap(); orderMap.add(tx, ModelGenerator.createOrder("@testOrder1", "Test Order", "Test")); Order queriedOrder = orderMap.getBy(tx, "Test", "@testOrder1"); @@ -188,6 +205,56 @@ public class ComponentContainerTest { } } + public static void testRealms(StrolchAgent agent) { + + ComponentContainer container = agent.getContainer(); + + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { + ResourceMap resourceMap = tx.getResourceMap(); + resourceMap.add(tx, ModelGenerator.createResource("@testRes1", "Test Res", "Test")); + Resource queriedRes = resourceMap.getBy(tx, "Test", "@testRes1"); + assertNotNull(queriedRes); + assertEquals("@testRes1", queriedRes.getId()); + + OrderMap orderMap = tx.getOrderMap(); + orderMap.add(tx, ModelGenerator.createOrder("@testOrder1", "Test Order", "Test")); + Order queriedOrder = orderMap.getBy(tx, "Test", "@testOrder1"); + assertNotNull(queriedOrder); + assertEquals("@testOrder1", queriedOrder.getId()); + } + + try (StrolchTransaction tx = container.getRealm("myRealm").openTx()) { + ResourceMap resourceMap = tx.getResourceMap(); + Resource myRealmRes = resourceMap.getBy(tx, "TestType", "MyRealmRes"); + assertNotNull(myRealmRes); + assertEquals("MyRealmRes", myRealmRes.getId()); + Resource otherRealmRes = resourceMap.getBy(tx, "TestType", "OtherRealmRes"); + assertNull(otherRealmRes); + + OrderMap orderMap = tx.getOrderMap(); + Order myRealmOrder = orderMap.getBy(tx, "TestType", "MyRealmOrder"); + assertNotNull(myRealmOrder); + assertEquals("MyRealmOrder", myRealmOrder.getId()); + Order otherRealmOrder = orderMap.getBy(tx, "TestType", "OtherRealmOrder"); + assertNull(otherRealmOrder); + } + try (StrolchTransaction tx = container.getRealm("otherRealm").openTx()) { + ResourceMap resourceMap = tx.getResourceMap(); + Resource otherRealmRes = resourceMap.getBy(tx, "TestType", "OtherRealmRes"); + assertNotNull(otherRealmRes); + assertEquals("OtherRealmRes", otherRealmRes.getId()); + Resource myRealmRes = resourceMap.getBy(tx, "TestType", "MyRealmRes"); + assertNull(myRealmRes); + + OrderMap orderMap = tx.getOrderMap(); + Order otherRealmOrder = orderMap.getBy(tx, "TestType", "OtherRealmOrder"); + assertNotNull(otherRealmOrder); + assertEquals("OtherRealmOrder", otherRealmOrder.getId()); + Order myRealmOrder = orderMap.getBy(tx, "TestType", "MyRealmOrder"); + assertNull(myRealmOrder); + } + } + public static StrolchAgent startContainer(String rootPath, String configSrc) { File rootPathF = new File(rootPath); File configSrcF = new File(configSrc); diff --git a/src/test/java/li/strolch/agent/RealmTest.java b/src/test/java/li/strolch/agent/RealmTest.java new file mode 100644 index 000000000..27c78de73 --- /dev/null +++ b/src/test/java/li/strolch/agent/RealmTest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013 Robert von Burg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package li.strolch.agent; + +import li.strolch.agent.api.StrolchAgent; +import static li.strolch.agent.ComponentContainerTest.*; + +import org.junit.Test; + +/** + * @author Robert von Burg + */ +public class RealmTest { + + @Test + public void shouldStartRealmTestContainer() { + + try { + StrolchAgent agent = startContainer(PATH_REALM_RUNTIME, PATH_REALM_CONTAINER); + testContainer(agent); + + + + destroyContainer(agent); + } catch (Exception e) { + logger.error(e.getMessage(), e); + throw e; + } + } +} diff --git a/src/test/java/li/strolch/runtime/test/component/ConfigurationParserTest.java b/src/test/java/li/strolch/runtime/configuration/ConfigurationParserTest.java similarity index 92% rename from src/test/java/li/strolch/runtime/test/component/ConfigurationParserTest.java rename to src/test/java/li/strolch/runtime/configuration/ConfigurationParserTest.java index de60bdad8..9fef0bffe 100644 --- a/src/test/java/li/strolch/runtime/test/component/ConfigurationParserTest.java +++ b/src/test/java/li/strolch/runtime/configuration/ConfigurationParserTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.component; +package li.strolch.runtime.configuration; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -87,8 +87,8 @@ public class ConfigurationParserTest { // // ResourceGeneratorHandler - // li.strolch.runtime.test.component.model.ResourceGeneratorHandlerTest - // li.strolch.runtime.test.component.model.ResourceGeneratorHandlerTestImpl + // li.strolch.runtime.configuration.model.ResourceGeneratorHandlerTest + // li.strolch.runtime.configuration.model.ResourceGeneratorHandlerTestImpl // // true // @@ -97,9 +97,9 @@ public class ConfigurationParserTest { .getComponentConfiguration("ResourceGeneratorHandler"); assertNotNull("Should have created a ResourceGeneratorHandler Configuration", persistenceHandlerConfiguration); assertEquals("ResourceGeneratorHandler", persistenceHandlerConfiguration.getName()); - assertEquals("li.strolch.runtime.test.component.model.ResourceGeneratorHandlerTest", + assertEquals("li.strolch.runtime.configuration.model.ResourceGeneratorHandlerTest", persistenceHandlerConfiguration.getApi()); - assertEquals("li.strolch.runtime.test.component.model.ResourceGeneratorHandlerTestImpl", + assertEquals("li.strolch.runtime.configuration.model.ResourceGeneratorHandlerTestImpl", persistenceHandlerConfiguration.getImpl()); assertEquals(1, persistenceHandlerConfiguration.getPropertyKeys().size()); assertEquals(true, persistenceHandlerConfiguration.getBoolean("verbose", null)); diff --git a/src/test/java/li/strolch/runtime/test/component/ControllerDependencyTest.java b/src/test/java/li/strolch/runtime/configuration/ControllerDependencyTest.java similarity index 99% rename from src/test/java/li/strolch/runtime/test/component/ControllerDependencyTest.java rename to src/test/java/li/strolch/runtime/configuration/ControllerDependencyTest.java index 3a8366019..a86481a2e 100644 --- a/src/test/java/li/strolch/runtime/test/component/ControllerDependencyTest.java +++ b/src/test/java/li/strolch/runtime/configuration/ControllerDependencyTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.component; +package li.strolch.runtime.configuration; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; diff --git a/src/test/java/li/strolch/runtime/test/component/model/PostInitializerTest.java b/src/test/java/li/strolch/runtime/configuration/model/PostInitializerTest.java similarity index 93% rename from src/test/java/li/strolch/runtime/test/component/model/PostInitializerTest.java rename to src/test/java/li/strolch/runtime/configuration/model/PostInitializerTest.java index 291914d80..79ac37e74 100644 --- a/src/test/java/li/strolch/runtime/test/component/model/PostInitializerTest.java +++ b/src/test/java/li/strolch/runtime/configuration/model/PostInitializerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.component.model; +package li.strolch.runtime.configuration.model; public interface PostInitializerTest { diff --git a/src/test/java/li/strolch/runtime/test/component/model/PostInitializerTestImpl.java b/src/test/java/li/strolch/runtime/configuration/model/PostInitializerTestImpl.java similarity index 95% rename from src/test/java/li/strolch/runtime/test/component/model/PostInitializerTestImpl.java rename to src/test/java/li/strolch/runtime/configuration/model/PostInitializerTestImpl.java index d3da73005..a17d309e1 100644 --- a/src/test/java/li/strolch/runtime/test/component/model/PostInitializerTestImpl.java +++ b/src/test/java/li/strolch/runtime/configuration/model/PostInitializerTestImpl.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.component.model; +package li.strolch.runtime.configuration.model; import li.strolch.agent.api.ComponentContainer; import li.strolch.agent.api.StrolchComponent; diff --git a/src/test/java/li/strolch/runtime/test/component/model/ResourceGeneratorHandlerTest.java b/src/test/java/li/strolch/runtime/configuration/model/ResourceGeneratorHandlerTest.java similarity index 94% rename from src/test/java/li/strolch/runtime/test/component/model/ResourceGeneratorHandlerTest.java rename to src/test/java/li/strolch/runtime/configuration/model/ResourceGeneratorHandlerTest.java index a88631058..6a20269a5 100644 --- a/src/test/java/li/strolch/runtime/test/component/model/ResourceGeneratorHandlerTest.java +++ b/src/test/java/li/strolch/runtime/configuration/model/ResourceGeneratorHandlerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.component.model; +package li.strolch.runtime.configuration.model; import li.strolch.model.Resource; diff --git a/src/test/java/li/strolch/runtime/test/component/model/ResourceGeneratorHandlerTestImpl.java b/src/test/java/li/strolch/runtime/configuration/model/ResourceGeneratorHandlerTestImpl.java similarity index 95% rename from src/test/java/li/strolch/runtime/test/component/model/ResourceGeneratorHandlerTestImpl.java rename to src/test/java/li/strolch/runtime/configuration/model/ResourceGeneratorHandlerTestImpl.java index 0ced1eace..eb9c11f8d 100644 --- a/src/test/java/li/strolch/runtime/test/component/model/ResourceGeneratorHandlerTestImpl.java +++ b/src/test/java/li/strolch/runtime/configuration/model/ResourceGeneratorHandlerTestImpl.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.component.model; +package li.strolch.runtime.configuration.model; import li.strolch.agent.api.ComponentContainer; import li.strolch.agent.api.StrolchComponent; diff --git a/src/test/java/li/strolch/runtime/test/component/model/ServiceHandlerTest.java b/src/test/java/li/strolch/runtime/configuration/model/ServiceHandlerTest.java similarity index 93% rename from src/test/java/li/strolch/runtime/test/component/model/ServiceHandlerTest.java rename to src/test/java/li/strolch/runtime/configuration/model/ServiceHandlerTest.java index 871ff6ecd..0e2ad8d47 100644 --- a/src/test/java/li/strolch/runtime/test/component/model/ServiceHandlerTest.java +++ b/src/test/java/li/strolch/runtime/configuration/model/ServiceHandlerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.component.model; +package li.strolch.runtime.configuration.model; public interface ServiceHandlerTest { diff --git a/src/test/java/li/strolch/runtime/test/component/model/ServiceHandlerTestImpl.java b/src/test/java/li/strolch/runtime/configuration/model/ServiceHandlerTestImpl.java similarity index 95% rename from src/test/java/li/strolch/runtime/test/component/model/ServiceHandlerTestImpl.java rename to src/test/java/li/strolch/runtime/configuration/model/ServiceHandlerTestImpl.java index c42a5b3b2..46f69f8eb 100644 --- a/src/test/java/li/strolch/runtime/test/component/model/ServiceHandlerTestImpl.java +++ b/src/test/java/li/strolch/runtime/configuration/model/ServiceHandlerTestImpl.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.component.model; +package li.strolch.runtime.configuration.model; import li.strolch.agent.api.ComponentContainer; import li.strolch.agent.api.StrolchComponent; diff --git a/src/test/java/li/strolch/runtime/test/component/model/ServiceResultTest.java b/src/test/java/li/strolch/runtime/configuration/model/ServiceResultTest.java similarity index 94% rename from src/test/java/li/strolch/runtime/test/component/model/ServiceResultTest.java rename to src/test/java/li/strolch/runtime/configuration/model/ServiceResultTest.java index a0502a5cb..0b72064ba 100644 --- a/src/test/java/li/strolch/runtime/test/component/model/ServiceResultTest.java +++ b/src/test/java/li/strolch/runtime/configuration/model/ServiceResultTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.component.model; +package li.strolch.runtime.configuration.model; public class ServiceResultTest { diff --git a/src/test/java/li/strolch/runtime/test/query/enums/EnumHandlerTest.java b/src/test/java/li/strolch/runtime/query/enums/EnumHandlerTest.java similarity index 95% rename from src/test/java/li/strolch/runtime/test/query/enums/EnumHandlerTest.java rename to src/test/java/li/strolch/runtime/query/enums/EnumHandlerTest.java index 81b4c0211..e183ef907 100644 --- a/src/test/java/li/strolch/runtime/test/query/enums/EnumHandlerTest.java +++ b/src/test/java/li/strolch/runtime/query/enums/EnumHandlerTest.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.query.enums; +package li.strolch.runtime.query.enums; import static org.junit.Assert.assertEquals; import java.util.Locale; +import li.strolch.agent.ComponentContainerTest; import li.strolch.agent.api.ComponentContainer; import li.strolch.agent.api.StrolchAgent; import li.strolch.runtime.query.enums.EnumHandler; import li.strolch.runtime.query.enums.StrolchEnum; -import li.strolch.runtime.test.component.ComponentContainerTest; import org.junit.Test; diff --git a/src/test/java/li/strolch/runtime/test/query/inmemory/FindByLocatorTest.java b/src/test/java/li/strolch/runtime/query/inmemory/FindByLocatorTest.java similarity index 91% rename from src/test/java/li/strolch/runtime/test/query/inmemory/FindByLocatorTest.java rename to src/test/java/li/strolch/runtime/query/inmemory/FindByLocatorTest.java index 96605d41e..0487baabc 100644 --- a/src/test/java/li/strolch/runtime/test/query/inmemory/FindByLocatorTest.java +++ b/src/test/java/li/strolch/runtime/query/inmemory/FindByLocatorTest.java @@ -13,9 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.query.inmemory; +package li.strolch.runtime.query.inmemory; import static org.junit.Assert.assertNotNull; +import li.strolch.agent.ComponentContainerTest; import li.strolch.agent.api.ComponentContainer; import li.strolch.agent.api.StrolchAgent; import li.strolch.model.Locator; @@ -24,7 +25,7 @@ import li.strolch.model.Resource; import li.strolch.model.parameter.FloatParameter; import li.strolch.model.parameter.StringParameter; import li.strolch.persistence.api.StrolchTransaction; -import li.strolch.runtime.test.component.ComponentContainerTest; +import li.strolch.runtime.StrolchConstants; import org.junit.Test; @@ -43,7 +44,7 @@ public class FindByLocatorTest { ComponentContainerTest.PATH_TRANSIENT_CONTAINER); ComponentContainer container = agent.getContainer(); - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { Locator locResStringParam = Locator.valueOf("Resource/TestType/MyTestResource/@bag01/@param5"); StringParameter resStringParam = tx.findElement(locResStringParam); assertNotNull("Should have found a StringParameter with the locator " + locResStringParam, resStringParam); diff --git a/src/test/java/li/strolch/runtime/test/query/inmemory/InMemoryQueryTest.java b/src/test/java/li/strolch/runtime/query/inmemory/InMemoryQueryTest.java similarity index 99% rename from src/test/java/li/strolch/runtime/test/query/inmemory/InMemoryQueryTest.java rename to src/test/java/li/strolch/runtime/query/inmemory/InMemoryQueryTest.java index 7f0f6f8e1..671ffd2b1 100644 --- a/src/test/java/li/strolch/runtime/test/query/inmemory/InMemoryQueryTest.java +++ b/src/test/java/li/strolch/runtime/query/inmemory/InMemoryQueryTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.query.inmemory; +package li.strolch.runtime.query.inmemory; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/li/strolch/runtime/test/query/inmemory/QueryTest.java b/src/test/java/li/strolch/runtime/query/inmemory/QueryTest.java similarity index 82% rename from src/test/java/li/strolch/runtime/test/query/inmemory/QueryTest.java rename to src/test/java/li/strolch/runtime/query/inmemory/QueryTest.java index bc515607e..f4e3b4de7 100644 --- a/src/test/java/li/strolch/runtime/test/query/inmemory/QueryTest.java +++ b/src/test/java/li/strolch/runtime/query/inmemory/QueryTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package li.strolch.runtime.test.query.inmemory; +package li.strolch.runtime.query.inmemory; import static li.strolch.model.ModelGenerator.BAG_ID; import static li.strolch.model.ModelGenerator.PARAM_STRING_ID; @@ -24,6 +24,7 @@ import static org.junit.Assert.assertEquals; import java.util.ArrayList; import java.util.List; +import li.strolch.agent.ComponentContainerTest; import li.strolch.agent.api.ComponentContainer; import li.strolch.agent.api.StrolchAgent; import li.strolch.model.Order; @@ -36,10 +37,7 @@ import li.strolch.model.query.ResourceQuery; import li.strolch.model.query.Selection; import li.strolch.model.query.StrolchTypeNavigation; import li.strolch.persistence.api.StrolchTransaction; -import li.strolch.runtime.query.inmemory.InMemoryOrderQueryVisitor; -import li.strolch.runtime.query.inmemory.InMemoryQuery; -import li.strolch.runtime.query.inmemory.InMemoryResourceQueryVisitor; -import li.strolch.runtime.test.component.ComponentContainerTest; +import li.strolch.runtime.StrolchConstants; import org.junit.Test; @@ -62,7 +60,7 @@ public class QueryTest { Resource res1 = createResource("@1", "Test Resource", "MyType"); IntegerParameter iP = new IntegerParameter("nbOfBooks", "Number of Books", 33); res1.addParameter(BAG_ID, iP); - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { tx.getResourceMap().add(tx, res1); } @@ -75,7 +73,7 @@ public class QueryTest { InMemoryResourceQueryVisitor resourceQuery = new InMemoryResourceQueryVisitor(); InMemoryQuery inMemoryQuery = resourceQuery.visit(query); List result; - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { result = inMemoryQuery.doQuery(tx.getPersistenceHandler().getResourceDao(tx)); } assertEquals(1, result.size()); @@ -92,7 +90,7 @@ public class QueryTest { Order o1 = createOrder("@1", "Test Order", "MyType"); IntegerParameter iP = new IntegerParameter("nbOfBooks", "Number of Books", 33); o1.addParameter(BAG_ID, iP); - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { tx.getOrderMap().add(tx, o1); } @@ -105,7 +103,7 @@ public class QueryTest { InMemoryOrderQueryVisitor orderQuery = new InMemoryOrderQueryVisitor(); InMemoryQuery inMemoryQuery = orderQuery.visit(query); List result; - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { result = inMemoryQuery.doQuery(tx.getPersistenceHandler().getOrderDao(tx)); } assertEquals(1, result.size()); @@ -120,14 +118,14 @@ public class QueryTest { ComponentContainer container = agent.getContainer(); Resource res1 = createResource("@1", "Test Resource", "MyType"); - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { tx.getResourceMap().add(tx, res1); } ResourceQuery query = new ResourceQuery(new StrolchTypeNavigation("MyType")); query.and().with(ParameterSelection.stringSelection(BAG_ID, PARAM_STRING_ID, "olch").contains(true)); List result; - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { result = tx.doQuery(query); } assertEquals(1, result.size()); @@ -142,14 +140,14 @@ public class QueryTest { ComponentContainer container = agent.getContainer(); Resource res1 = createResource("@1", "Test Resource", "MyType"); - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { tx.getResourceMap().add(tx, res1); } ResourceQuery query = new ResourceQuery(new StrolchTypeNavigation("MyType")); query.and().with(ParameterSelection.stringSelection(BAG_ID, PARAM_STRING_ID, "str").contains(true)); List result; - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { result = tx.doQuery(query); } assertEquals(0, result.size()); @@ -163,14 +161,14 @@ public class QueryTest { ComponentContainer container = agent.getContainer(); Resource res1 = createResource("@1", "Test Resource", "MyType"); - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { tx.getResourceMap().add(tx, res1); } ResourceQuery query = new ResourceQuery(new StrolchTypeNavigation("MyType")); query.and().with(ParameterSelection.stringSelection(BAG_ID, PARAM_STRING_ID, "strolch").caseInsensitive(true)); List result; - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { result = tx.doQuery(query); } assertEquals(1, result.size()); @@ -185,14 +183,14 @@ public class QueryTest { ComponentContainer container = agent.getContainer(); Resource res1 = createResource("@1", "Test Resource", "MyType"); - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { tx.getResourceMap().add(tx, res1); } ResourceQuery query = new ResourceQuery(new StrolchTypeNavigation("MyType")); query.and().with(ParameterSelection.stringSelection(BAG_ID, PARAM_STRING_ID, "strolch")); List result; - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { result = tx.doQuery(query); } assertEquals(0, result.size()); @@ -207,7 +205,7 @@ public class QueryTest { Resource res1 = createResource("@1", "Test Resource", "MyType"); Resource res2 = createResource("@2", "Test Resource", "MyType"); - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { tx.getResourceMap().add(tx, res1); tx.getResourceMap().add(tx, res2); } @@ -216,7 +214,7 @@ public class QueryTest { ResourceQuery query = new ResourceQuery(new StrolchTypeNavigation("MyType")); query.not(new IdSelection("@1")); List result; - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { result = tx.doQuery(query); } assertEquals(1, result.size()); @@ -227,7 +225,7 @@ public class QueryTest { ResourceQuery query = new ResourceQuery(new StrolchTypeNavigation("MyType")); query.not(new IdSelection("@2")); List result; - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { result = tx.doQuery(query); } assertEquals(1, result.size()); @@ -238,7 +236,7 @@ public class QueryTest { ResourceQuery query = new ResourceQuery(new StrolchTypeNavigation("MyType")); query.not(new IdSelection("@1", "@2")); List result; - try (StrolchTransaction tx = container.getDefaultRealm().openTx()) { + try (StrolchTransaction tx = container.getRealm(StrolchConstants.DEFAULT_REALM).openTx()) { result = tx.doQuery(query); } assertEquals(0, result.size()); diff --git a/src/test/resources/cachedtest/config/StrolchConfiguration.xml b/src/test/resources/cachedtest/config/StrolchConfiguration.xml index ad02059dd..d84bc52d3 100644 --- a/src/test/resources/cachedtest/config/StrolchConfiguration.xml +++ b/src/test/resources/cachedtest/config/StrolchConfiguration.xml @@ -10,16 +10,16 @@ ServiceHandler - li.strolch.runtime.test.component.model.ServiceHandlerTest - li.strolch.runtime.test.component.model.ServiceHandlerTestImpl + li.strolch.runtime.configuration.model.ServiceHandlerTest + li.strolch.runtime.configuration.model.ServiceHandlerTestImpl PersistenceHandler PostInitializer - li.strolch.runtime.test.component.model.PostInitializerTest - li.strolch.runtime.test.component.model.PostInitializerTestImpl + li.strolch.runtime.configuration.model.PostInitializerTest + li.strolch.runtime.configuration.model.PostInitializerTestImpl ServiceHandler diff --git a/src/test/resources/configtest/config/StrolchConfiguration.xml b/src/test/resources/configtest/config/StrolchConfiguration.xml index 008c3327a..d7892e019 100644 --- a/src/test/resources/configtest/config/StrolchConfiguration.xml +++ b/src/test/resources/configtest/config/StrolchConfiguration.xml @@ -26,8 +26,8 @@ ResourceGeneratorHandler - li.strolch.runtime.test.component.model.ResourceGeneratorHandlerTest - li.strolch.runtime.test.component.model.ResourceGeneratorHandlerTestImpl + li.strolch.runtime.configuration.model.ResourceGeneratorHandlerTest + li.strolch.runtime.configuration.model.ResourceGeneratorHandlerTestImpl PersistenceHandler ServiceHandler diff --git a/src/test/resources/emptytest/config/StrolchConfiguration.xml b/src/test/resources/emptytest/config/StrolchConfiguration.xml index a0a2c4285..af27866e8 100644 --- a/src/test/resources/emptytest/config/StrolchConfiguration.xml +++ b/src/test/resources/emptytest/config/StrolchConfiguration.xml @@ -9,15 +9,15 @@ ServiceHandler - li.strolch.runtime.test.component.model.ServiceHandlerTest - li.strolch.runtime.test.component.model.ServiceHandlerTestImpl + li.strolch.runtime.configuration.model.ServiceHandlerTest + li.strolch.runtime.configuration.model.ServiceHandlerTestImpl ResourceGeneratorHandler - li.strolch.runtime.test.component.model.ResourceGeneratorHandlerTest - li.strolch.runtime.test.component.model.ResourceGeneratorHandlerTestImpl + li.strolch.runtime.configuration.model.ResourceGeneratorHandlerTest + li.strolch.runtime.configuration.model.ResourceGeneratorHandlerTestImpl true diff --git a/src/test/resources/realmtest/config/StrolchConfiguration.xml b/src/test/resources/realmtest/config/StrolchConfiguration.xml index cad0c638d..3591b5391 100644 --- a/src/test/resources/realmtest/config/StrolchConfiguration.xml +++ b/src/test/resources/realmtest/config/StrolchConfiguration.xml @@ -4,31 +4,33 @@ StrolchRuntimeTest TRANSIENT - myRealm - StrolchModel.xml + defaultRealm, myRealm, otherRealm + DefaultRealm.xml + MyRealm.xml + OtherRealm.xml true ServiceHandler - li.strolch.runtime.test.component.model.ServiceHandlerTest - li.strolch.runtime.test.component.model.ServiceHandlerTestImpl + li.strolch.runtime.configuration.model.ServiceHandlerTest + li.strolch.runtime.configuration.model.ServiceHandlerTestImpl PersistenceHandler PostInitializer - li.strolch.runtime.test.component.model.PostInitializerTest - li.strolch.runtime.test.component.model.PostInitializerTestImpl + li.strolch.runtime.configuration.model.PostInitializerTest + li.strolch.runtime.configuration.model.PostInitializerTestImpl ServiceHandler ResourceGeneratorHandler - li.strolch.runtime.test.component.model.ResourceGeneratorHandlerTest - li.strolch.runtime.test.component.model.ResourceGeneratorHandlerTestImpl + li.strolch.runtime.configuration.model.ResourceGeneratorHandlerTest + li.strolch.runtime.configuration.model.ResourceGeneratorHandlerTestImpl true diff --git a/src/test/resources/realmtest/data/StrolchModel.xml b/src/test/resources/realmtest/data/DefaultRealm.xml similarity index 100% rename from src/test/resources/realmtest/data/StrolchModel.xml rename to src/test/resources/realmtest/data/DefaultRealm.xml diff --git a/src/test/resources/realmtest/data/MyRealm.xml b/src/test/resources/realmtest/data/MyRealm.xml new file mode 100644 index 000000000..8faa85b0d --- /dev/null +++ b/src/test/resources/realmtest/data/MyRealm.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/resources/realmtest/data/OtherRealm.xml b/src/test/resources/realmtest/data/OtherRealm.xml new file mode 100644 index 000000000..072053cc9 --- /dev/null +++ b/src/test/resources/realmtest/data/OtherRealm.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/resources/transactionaltest/config/StrolchConfiguration.xml b/src/test/resources/transactionaltest/config/StrolchConfiguration.xml index 26ae04d7a..b5b9e434a 100644 --- a/src/test/resources/transactionaltest/config/StrolchConfiguration.xml +++ b/src/test/resources/transactionaltest/config/StrolchConfiguration.xml @@ -10,16 +10,16 @@ ServiceHandler - li.strolch.runtime.test.component.model.ServiceHandlerTest - li.strolch.runtime.test.component.model.ServiceHandlerTestImpl + li.strolch.runtime.configuration.model.ServiceHandlerTest + li.strolch.runtime.configuration.model.ServiceHandlerTestImpl PersistenceHandler PostInitializer - li.strolch.runtime.test.component.model.PostInitializerTest - li.strolch.runtime.test.component.model.PostInitializerTestImpl + li.strolch.runtime.configuration.model.PostInitializerTest + li.strolch.runtime.configuration.model.PostInitializerTestImpl ServiceHandler diff --git a/src/test/resources/transienttest/config/StrolchConfiguration.xml b/src/test/resources/transienttest/config/StrolchConfiguration.xml index e27bd48cf..ec5b0bff5 100644 --- a/src/test/resources/transienttest/config/StrolchConfiguration.xml +++ b/src/test/resources/transienttest/config/StrolchConfiguration.xml @@ -10,24 +10,24 @@ ServiceHandler - li.strolch.runtime.test.component.model.ServiceHandlerTest - li.strolch.runtime.test.component.model.ServiceHandlerTestImpl + li.strolch.runtime.configuration.model.ServiceHandlerTest + li.strolch.runtime.configuration.model.ServiceHandlerTestImpl PersistenceHandler PostInitializer - li.strolch.runtime.test.component.model.PostInitializerTest - li.strolch.runtime.test.component.model.PostInitializerTestImpl + li.strolch.runtime.configuration.model.PostInitializerTest + li.strolch.runtime.configuration.model.PostInitializerTestImpl ServiceHandler ResourceGeneratorHandler - li.strolch.runtime.test.component.model.ResourceGeneratorHandlerTest - li.strolch.runtime.test.component.model.ResourceGeneratorHandlerTestImpl + li.strolch.runtime.configuration.model.ResourceGeneratorHandlerTest + li.strolch.runtime.configuration.model.ResourceGeneratorHandlerTestImpl true