diff options
author | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-26 04:20:17 +0000 |
---|---|---|
committer | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-26 04:20:17 +0000 |
commit | 65c28a20f12ba4051353ae40558164cd75701026 (patch) | |
tree | f782e94378435453d4ef2256c157b4b8215fca42 /sca-java-2.x/trunk/modules/assembly/src/test/java/org/apache/tuscany/sca | |
parent | d796a7db8c9eeddf42dc9f864d1f5860faff8b35 (diff) |
TUSCANY-3630 Add externalAttachment model
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@979149 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly/src/test/java/org/apache/tuscany/sca')
-rw-r--r-- | sca-java-2.x/trunk/modules/assembly/src/test/java/org/apache/tuscany/sca/policy/PolicyFactoryTestCase.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly/src/test/java/org/apache/tuscany/sca/policy/PolicyFactoryTestCase.java b/sca-java-2.x/trunk/modules/assembly/src/test/java/org/apache/tuscany/sca/policy/PolicyFactoryTestCase.java index 2775c4ac71..569366ad1b 100644 --- a/sca-java-2.x/trunk/modules/assembly/src/test/java/org/apache/tuscany/sca/policy/PolicyFactoryTestCase.java +++ b/sca-java-2.x/trunk/modules/assembly/src/test/java/org/apache/tuscany/sca/policy/PolicyFactoryTestCase.java @@ -52,4 +52,22 @@ public class PolicyFactoryTestCase { policySet.setName(new QName("http://test", "reliability")); assertEquals(policySet.getName(), new QName("http://test", "reliability")); } + + @Test + public void testCreateExternalAttachment() { + ExternalAttachment attachment = factory.createExternalAttachment(); + attachment.setAttachTo("sca:component"); + + Intent intent = factory.createIntent(); + intent.setName(new QName("http://test", "reliability")); + attachment.getIntents().add(intent); + + PolicySet policySet = factory.createPolicySet(); + policySet.setName(new QName("http://test", "reliability")); + attachment.getPolicySets().add(policySet); + + assertEquals("sca:component", attachment.getAttachTo()); + assertEquals(intent, attachment.getIntents().get(0)); + assertEquals(policySet, attachment.getPolicySets().get(0)); + } } |