diff options
Diffstat (limited to 'java/sca/modules/domain-node/src/test')
-rw-r--r-- | java/sca/modules/domain-node/src/test/java/org/apache/tuscany/sca/node/ConfigTestCase.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/java/sca/modules/domain-node/src/test/java/org/apache/tuscany/sca/node/ConfigTestCase.java b/java/sca/modules/domain-node/src/test/java/org/apache/tuscany/sca/node/ConfigTestCase.java index 6327ae06b2..4ca8f180bb 100644 --- a/java/sca/modules/domain-node/src/test/java/org/apache/tuscany/sca/node/ConfigTestCase.java +++ b/java/sca/modules/domain-node/src/test/java/org/apache/tuscany/sca/node/ConfigTestCase.java @@ -39,4 +39,25 @@ public class ConfigTestCase{ assertEquals("y", domain.getConfigAttributes().getAttributes().get("p2"));
}
+ @Test
+ public void testConfig1() throws Exception {
+ DomainNode domain = new DomainNode("foo:someDomain:1234?p1=x&p2=y");
+ assertEquals(4, domain.getConfigAttributes().getAttributes().size());
+ assertEquals("someDomain", domain.getDomainName());
+ assertEquals("foo", domain.getConfigAttributes().getAttributes().get("domainScheme"));
+ assertEquals("someDomain", domain.getConfigAttributes().getAttributes().get("domainName"));
+ assertEquals("x", domain.getConfigAttributes().getAttributes().get("p1"));
+ assertEquals("y", domain.getConfigAttributes().getAttributes().get("p2"));
+ }
+
+ @Test
+ public void testConfig2() throws Exception {
+ DomainNode domain = new DomainNode("foo:/someDomain:1234?p1=x&p2=y");
+ assertEquals(4, domain.getConfigAttributes().getAttributes().size());
+ assertEquals("someDomain", domain.getDomainName());
+ assertEquals("foo", domain.getConfigAttributes().getAttributes().get("domainScheme"));
+ assertEquals("someDomain", domain.getConfigAttributes().getAttributes().get("domainName"));
+ assertEquals("x", domain.getConfigAttributes().getAttributes().get("p1"));
+ assertEquals("y", domain.getConfigAttributes().getAttributes().get("p2"));
+ }
}
|