ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Ws Wiki] Update of "Tuscany/TuscanyJava/Tests/RogueWave/Samples" by KelvinGoodson
Date Mon, 30 Oct 2006 11:47:50 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.

The following page has been changed by KelvinGoodson:

New page:
A place for jotting notes on how the RogueWave sample tests fit in with the current Tuscany
set up.

=== general points ===
Tuscany currently expects all test case classes to end with "TestCase"
We don't use the INSTANCE singletons wherever possible,  sionce they can cause cross test
especially when using maven,  since maven builds an ubertest,  and so there is more scope
for one
test changing the state of an instance prior to running another.

=== DataObjectListTestCase ===

Frank looked at this on 26th October and putt a note on Tuscany-829.

Out of 23 tests, 2 end in error and 3 in failure.

testAddObject ...
{{{java.lang.IllegalArgumentException: Class 'AnyTypeDataObject' does not have a feature named
	at org.apache.tuscany.sdo.util.DataObjectUtil.getOpenFeature(
	at org.apache.tuscany.sdo.util.DataObjectUtil.getProperty(
	at org.apache.tuscany.sdo.impl.DataObjectImpl.getProperty(
	at org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.setFeatureName(
	at org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.process(
	at org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.init(
	at org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.create(
	at org.apache.tuscany.sdo.util.DataObjectUtil.get(
	at org.apache.tuscany.sdo.impl.DataObjectImpl.get(
	at org.apache.tuscany.sdo.impl.DataObjectImpl.getList(
	at com.roguewave.rwsf.sdo.DataObjectListTestCase.createTestObj(
	at com.roguewave.rwsf.sdo.DataObjectListTestCase.testAddObject(


this relates to Frank's comment ... 
1. RogueWave seems to assume that TypeHelper.define() defines both a Type and corresponding
global element for it. Tuscany only defines the Type and requires a global element be created
separately. Although the spec doesn't spell this out exactly, I think that RW has it right
because even though it doesn't say that TypeHelper.define() does this, it does say in the
SDO to XSD mapping section, that an SDO Type generates both a complexType and a global element.
I suggest that we open a JIRA to fix this in Tuscany. 
since loading the document
 XMLDocument doc=loadDocFromString("<catalog2></catalog2>");
assumes that TypeHelper.define() on
 DataObject newType = createType("","catalog2");
would create a global element "catalog2"

I've opened to deal with this.

2. RogueWave seems to allow a Type to be modified (i.e., properties added) after calling TypeHelper.define().
This may be ambiguous in the spec, but the intent is to not allow this - because in general
this can cause all kinds of problems, especially if instances have already been created. I
suggest fixing this one in the test case - in createTestObjectTypes(), move the call to types.define(newType)
after the product2 property is created/initialized. 

Tuscany issue --
adding null to a list
        XMLDocument doc=loadDocFromString("<catalog2><product2/><product2/></catalog2>");
        List listTest=createTestObj(doc);
            fail("no exception were thrown");
gives ...
junit.framework.AssertionFailedError: no exception were thrown
	at com.roguewave.rwsf.sdo.DataObjectListTestCase.testAddNull(

It would seem from testSubList that Tuscany's FeatureMapUtil$FeatureEList doesnt behave well
when viewed through a java SubList
        List listRes=listTest.subList(0,1);

junit.framework.AssertionFailedError: expected:<2> but was:<1>

	at junit.framework.Assert.assertEquals(
	at com.roguewave.rwsf.sdo.DataObjectListTestCase.testSubList(

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message