You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ro...@apache.org on 2007/04/10 12:36:03 UTC

svn commit: r527090 - in /incubator/tuscany/cpp/sdo/runtime/core/test: main.cpp sdotest.cpp sdotest.h sdotest2.cpp

Author: robbinspg
Date: Tue Apr 10 03:36:02 2007
New Revision: 527090

URL: http://svn.apache.org/viewvc?view=rev&rev=527090
Log:
TUSCANY-1147 Add test case

Modified:
    incubator/tuscany/cpp/sdo/runtime/core/test/main.cpp
    incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp
    incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.h
    incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp

Modified: incubator/tuscany/cpp/sdo/runtime/core/test/main.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/test/main.cpp?view=diff&rev=527090&r1=527089&r2=527090
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/test/main.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/test/main.cpp Tue Apr 10 03:36:02 2007
@@ -46,9 +46,6 @@
     int totaltests=0;
     int value = 0;
     try {
-
-    // TEST ( sdotest::upandatom() );
-
     //TEST (  sdotest::eBayTest() );
     TEST ( sdotest::xhtml1() );
     TEST ( sdotest::scopetest() );
@@ -168,7 +165,7 @@
     TEST (  sdotest::b47137b() );
     TEST (  sdotest::b46633() );
     TEST (  sdotest::b46693() );
-    /* TEST (  sdotest::b46734() ); */
+    TEST (  sdotest::b46734() ); 
     TEST (  sdotest::b46634() );
     TEST (  sdotest::b46617b() );
     TEST (  sdotest::b46617() );
@@ -185,6 +182,9 @@
 	TEST (  sdotest::tuscany963() );
 	TEST (  sdotest::tuscany562() );
 	TEST (  sdotest::typedefinitionstest() );
+    
+    TEST (  sdotest::jira1174() );
+
     } catch(...)
     {
         cout << "unexpected exception caught" << endl;

Modified: incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp?view=diff&rev=527090&r1=527089&r2=527090
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp Tue Apr 10 03:36:02 2007
@@ -6812,10 +6812,10 @@
 
         XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
         
-        xsh->defineFile("wsdl.xsd");
+        xsh->defineFile("http://schemas.xmlsoap.org/wsdl/");
         if ((i = xsh->getErrorCount()) > 0)
         {
-            if (!silent)
+            if (true)
             {
                 cout << "WSDL XSD reported some errors:" << endl;
                 for (j=0;j<i;j++)
@@ -6827,10 +6827,10 @@
             }
             return 0;
         }
-        xsh->defineFile("wsdl-soap.xsd");
+        xsh->defineFile("http://schemas.xmlsoap.org/wsdl/soap/");
         if ((i = xsh->getErrorCount()) > 0)
         {
-            if (!silent) 
+            if (true) 
             {
                 cout << "WSDL SOAP XSD reported some errors:" << endl;
                 for (j=0;j<i;j++)
@@ -6842,10 +6842,10 @@
             }
             return 0;
         }
-        xsh->defineFile("wsdl-http.xsd");
+        xsh->defineFile("http://schemas.xmlsoap.org/wsdl/http/");
         if ((i = xsh->getErrorCount()) > 0)
         {
-            if (!silent)
+            if (true)
             {
                 cout << "WSDL HTTP XSD reported some errors:" << endl;
                 for (j=0;j<i;j++)
@@ -6863,7 +6863,7 @@
 
         if ((i = myXMLHelper->getErrorCount()) > 0)
         {
-            if (!silent)
+            if (true)
             {
                 cout << "XML reported some errors:" << endl;
                 for (j=0;j<i;j++)
@@ -6880,7 +6880,7 @@
     }
     catch (SDORuntimeException e)
     {
-        if (!silent)cout << "b46734 failed" << endl << e << endl;
+        if (true)cout << "b46734 failed" << endl << e << endl;
         return 0;
     }
 

Modified: incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.h?view=diff&rev=527090&r1=527089&r2=527090
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.h Tue Apr 10 03:36:02 2007
@@ -207,4 +207,5 @@
         static int upandatom();
         static int typedefinitionstest();
         static int eBayTest();
+        static int jira1174();
 };

Modified: incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp?view=diff&rev=527090&r1=527089&r2=527090
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp Tue Apr 10 03:36:02 2007
@@ -1839,4 +1839,33 @@
         return 0;
     }
     return 1;
-}
\ No newline at end of file
+}
+
+int sdotest::jira1174()
+{
+
+    try {
+
+ 
+        DataFactoryPtr mdg  = DataFactory::getDataFactory();
+
+        XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ 
+        xsh->defineFile("company.xsd");
+
+
+        DataObjectPtr comp = mdg->create("companyNS", "CompanyType");
+        DataObjectPtr dept = comp->createDataObject("departments");
+        DataObjectPtr ron = dept->createDataObject("employees");
+        ron->setCString("name", "Ron");
+        comp->setDataObject("employeeOfTheMonth", ron);
+        comp = NULL;
+        return 1;
+    }
+    catch (SDORuntimeException e)
+    {
+        cout << "Exception in jira1174" << e << endl;
+        return 0;
+    }
+}
+



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