diff options
Diffstat (limited to 'branches/sca-java-integration/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/model/IntentNameTestCase.java')
-rw-r--r-- | branches/sca-java-integration/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/model/IntentNameTestCase.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/branches/sca-java-integration/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/model/IntentNameTestCase.java b/branches/sca-java-integration/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/model/IntentNameTestCase.java new file mode 100644 index 0000000000..7bd2e61ba4 --- /dev/null +++ b/branches/sca-java-integration/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/model/IntentNameTestCase.java @@ -0,0 +1,16 @@ +package org.apache.tuscany.spi.model; + +import java.util.Arrays; + +import junit.framework.TestCase; + +public class IntentNameTestCase extends TestCase { + + public void testConstructor() throws Exception { + String case1 = "sec.confidentiality/message/body"; + IntentName intentName = new IntentName(case1); + assertEquals("sec", intentName.getDomain()); + assertEquals(case1, intentName.toString()); + assertTrue(Arrays.equals(new String[]{"confidentiality", "message", "body"}, intentName.getQualifiedNames())); + } +} |