db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r580056 [3/3] - in /db/ojb/branches/OJB_1_0_RELEASE/src/xdoclet: ./ java/src/xdoclet/modules/ojb/ java/src/xdoclet/modules/ojb/constraints/ java/src/xdoclet/modules/ojb/model/ test/xdoclet/modules/ojb/tests/
Date Thu, 27 Sep 2007 15:08:41 GMT
Modified: db/ojb/branches/OJB_1_0_RELEASE/src/xdoclet/test/xdoclet/modules/ojb/tests/ModifyInheritedTagPrimarykeyAttributeTests.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/xdoclet/test/xdoclet/modules/ojb/tests/ModifyInheritedTagPrimarykeyAttributeTests.java?rev=580056&r1=580055&r2=580056&view=diff
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/xdoclet/test/xdoclet/modules/ojb/tests/ModifyInheritedTagPrimarykeyAttributeTests.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/xdoclet/test/xdoclet/modules/ojb/tests/ModifyInheritedTagPrimarykeyAttributeTests.java
Thu Sep 27 08:08:38 2007
@@ -567,7 +567,107 @@
             "  private int id;\n"+
             "}\n");
 
-        assertNull(runOjbXDoclet(OJB_DEST_FILE));
-        assertNull(runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
+        String result = runOjbXDoclet(OJB_DEST_FILE);
+        //System.out.println("## " + result);
+        assertEquals(
+                "<!-- file containing the repository descriptions for user-defined types
-->\n" +
+                "<!-- Generated by the xdoclet-ojb module -->\n" +
+                "\n" +
+                "<class-descriptor\n" +
+                "    class=\"test.A\"\n" +
+                "    table=\"A\"\n" +
+                ">\n" +
+                "    <field-descriptor\n" +
+                "        name=\"id\"\n" +
+                "        column=\"id\"\n" +
+                "        jdbc-type=\"INTEGER\"\n" +
+                "        primarykey=\"true\"\n" +
+                "        autoincrement=\"true\"\n" +
+                "    >\n" +
+                "    </field-descriptor>\n" +
+                "</class-descriptor>\n" +
+                "<class-descriptor\n" +
+                "    class=\"test.B\"\n" +
+                "    table=\"B\"\n" +
+                ">\n" +
+                "    <field-descriptor\n" +
+                "        name=\"id\"\n" +
+                "        column=\"id\"\n" +
+                "        jdbc-type=\"INTEGER\"\n" +
+                "        primarykey=\"true\"\n" +
+                "        access=\"readwrite\"\n" +
+                "    >\n" +
+                "    </field-descriptor>\n" +
+                "    <reference-descriptor\n" +
+                "        name=\"super\"\n" +
+                "        class-ref=\"test.A\"\n" +
+                "        auto-retrieve=\"true\"\n" +
+                "        auto-update=\"true\"\n" +
+                "        auto-delete=\"true\"\n" +
+                "    >\n" +
+                "        <foreignkey field-ref=\"id\"/>\n" +
+                "    </reference-descriptor>\n" +
+                "</class-descriptor>\n" +
+                "<class-descriptor\n" +
+                "    class=\"test.C\"\n" +
+                "    table=\"C\"\n" +
+                ">\n" +
+                "    <field-descriptor\n" +
+                "        name=\"id\"\n" +
+                "        column=\"id\"\n" +
+                "        jdbc-type=\"INTEGER\"\n" +
+                "        primarykey=\"true\"\n" +
+                "        access=\"readwrite\"\n" +
+                "    >\n" +
+                "    </field-descriptor>\n" +
+                "    <reference-descriptor\n" +
+                "        name=\"super\"\n" +
+                "        class-ref=\"test.B\"\n" +
+                "        auto-retrieve=\"true\"\n" +
+                "        auto-update=\"true\"\n" +
+                "        auto-delete=\"true\"\n" +
+                "    >\n" +
+                "        <foreignkey field-ref=\"id\"/>\n" +
+                "    </reference-descriptor>\n" +
+                "</class-descriptor>", result);
+        result = runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest");
+        //System.out.println("## " + result);
+        assertEquals(
+                "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"no\" ?>\n"
+
+                        "<!DOCTYPE database SYSTEM \"http://jakarta.apache.org/turbine/dtd/database.dtd\">\n"
+
+                        "<!-- Generated by the xdoclet-ojb module -->\n" +
+                        "\n" +
+                        "<database name=\"ojbtest\">\n" +
+                        "    <table name=\"A\">\n" +
+                        "        <column name=\"id\"\n" +
+                        "                javaName=\"id\"\n" +
+                        "                type=\"INTEGER\"\n" +
+                        "                primaryKey=\"true\"\n" +
+                        "                required=\"true\"\n" +
+                        "        />\n" +
+                        "    </table>\n" +
+                        "    <table name=\"B\">\n" +
+                        "        <column name=\"id\"\n" +
+                        "                javaName=\"id\"\n" +
+                        "                type=\"INTEGER\"\n" +
+                        "                primaryKey=\"true\"\n" +
+                        "                required=\"true\"\n" +
+                        "        />\n" +
+                        "        <foreign-key foreignTable=\"A\">\n" +
+                        "            <reference local=\"id\" foreign=\"id\"/>\n" +
+                        "        </foreign-key>\n" +
+                        "    </table>\n" +
+                        "    <table name=\"C\">\n" +
+                        "        <column name=\"id\"\n" +
+                        "                javaName=\"id\"\n" +
+                        "                type=\"INTEGER\"\n" +
+                        "                primaryKey=\"true\"\n" +
+                        "                required=\"true\"\n" +
+                        "        />\n" +
+                        "        <foreign-key foreignTable=\"B\">\n" +
+                        "            <reference local=\"id\" foreign=\"id\"/>\n" +
+                        "        </foreign-key>\n" +
+                        "    </table>\n" +
+                        "</database>", result);
     }
 }

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/xdoclet/test/xdoclet/modules/ojb/tests/RunAllTests.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/xdoclet/test/xdoclet/modules/ojb/tests/RunAllTests.java?rev=580056&r1=580055&r2=580056&view=diff
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/xdoclet/test/xdoclet/modules/ojb/tests/RunAllTests.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/xdoclet/test/xdoclet/modules/ojb/tests/RunAllTests.java
Thu Sep 27 08:08:38 2007
@@ -50,6 +50,7 @@
     {
         TestSuite suite = new TestSuite("XDoclet OJB module tests");
 
+//        suite.addTest(new TestSuite(InheritanceTests.class));
 //        suite.addTest(new TestSuite(ClassTagSimpleTests.class));
 //        suite.addTest(new TestSuite(ClassTagAcceptLocksAttributeTests.class));
 //        suite.addTest(new TestSuite(ClassTagAttributesAttributeTests.class));
@@ -101,7 +102,7 @@
 //        suite.addTest(new TestSuite(FieldTagUpdateLockAttributeTests.class));
 
 //        suite.addTest(new TestSuite(FieldTagStateDetectionAttributeTests.class));
-//!!!!        //suite.addTest(new TestSuite(FieldTagFieldClassAttributeTests.class));
+//        suite.addTest(new TestSuite(FieldTagFieldClassAttributeTests.class));
 //        suite.addTest(new TestSuite(AnonymousFieldTagTests.class));
 //        suite.addTest(new TestSuite(ReferenceTagAttributesAttributeTests.class));
 //        suite.addTest(new TestSuite(ReferenceTagAutoDeleteAttributeTests.class));



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message