tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agr...@apache.org
Subject svn commit: r553188 - /incubator/tuscany/java/cts/sdo2.1/src/main/java/test/sdo21/tests/api/TypeHelper/TypeHelperTest.java
Date Wed, 04 Jul 2007 12:23:08 GMT
Author: agrove
Date: Wed Jul  4 05:23:07 2007
New Revision: 553188

URL: http://svn.apache.org/viewvc?view=rev&rev=553188
Log:
added new test to TypeHelperTest to check that newly created type has correct default values
for abstract, open, sequened, dataType (should all be false)

Modified:
    incubator/tuscany/java/cts/sdo2.1/src/main/java/test/sdo21/tests/api/TypeHelper/TypeHelperTest.java

Modified: incubator/tuscany/java/cts/sdo2.1/src/main/java/test/sdo21/tests/api/TypeHelper/TypeHelperTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/cts/sdo2.1/src/main/java/test/sdo21/tests/api/TypeHelper/TypeHelperTest.java?view=diff&rev=553188&r1=553187&r2=553188
==============================================================================
--- incubator/tuscany/java/cts/sdo2.1/src/main/java/test/sdo21/tests/api/TypeHelper/TypeHelperTest.java
(original)
+++ incubator/tuscany/java/cts/sdo2.1/src/main/java/test/sdo21/tests/api/TypeHelper/TypeHelperTest.java
Wed Jul  4 05:23:07 2007
@@ -61,6 +61,23 @@
     }
 
     /**
+     * Test that newly defined type has correct default values for open, sequenced, abstract,
dataType
+     */
+    @Test
+    public void testNewTypeDefaults() {
+        HelperContext scope = getScope();
+        TypeHelper typeHelper = scope.getTypeHelper();
+        DataObject defineDO2 = scope.getDataFactory().create("commonj.sdo", "Type");
+        defineDO2.set("uri", StandardFactory.TEST_NAMESPACE);
+        defineDO2.set("name", "testNewTypeOpenIsFalse");
+        Type t = typeHelper.define(defineDO2);
+        assertFalse("Newly created type should have open=false by default", t.isOpen());
+        assertFalse("Newly created type should have abstract=false by default", t.isAbstract());
+        assertFalse("Newly created type should have sequenced=false by default", t.isSequenced());
+        assertFalse("Newly created type should have dataType=false by default", t.isDataType());
+    }
+
+    /**
      * Verify the performance of TypeHelper.getType(URI, Name)
      *
      * @throws Exception



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message