db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r365968 - in /db/ddlutils/trunk/src: java/mapping.xml test/org/apache/ddlutils/io/TestDatabaseIO.java
Date Wed, 04 Jan 2006 19:12:42 GMT
Author: mvdb
Date: Wed Jan  4 11:12:34 2006
New Revision: 365968

URL: http://svn.apache.org/viewcvs?rev=365968&view=rev
Log:
Add javaName to the mapping and updated the tests to check if it is working.

Modified:
    db/ddlutils/trunk/src/java/mapping.xml
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatabaseIO.java

Modified: db/ddlutils/trunk/src/java/mapping.xml
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/mapping.xml?rev=365968&r1=365967&r2=365968&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/mapping.xml (original)
+++ db/ddlutils/trunk/src/java/mapping.xml Wed Jan  4 11:12:34 2006
@@ -31,6 +31,7 @@
       <attribute name="default"       property="defaultValue"/>
       <attribute name="autoIncrement" property="autoIncrement"/>
       <attribute name="description"   property="description"/>
+      <attribute name="javaName"      property="javaName"/>
     </element>
   </class>
 

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatabaseIO.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatabaseIO.java?rev=365968&r1=365967&r2=365968&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatabaseIO.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatabaseIO.java Wed Jan  4 11:12:34
2006
@@ -79,7 +79,8 @@
             "            type='INTEGER'\n" +
             "            primaryKey='true'\n" +
             "            required='true'\n" +
-            "            description='The primary key'/>\n" +
+            "            description='The primary key'\n" +
+            "            javaName='javaId'/>\n" +
             "  </table>\n" +
             "</database>");
 
@@ -116,11 +117,11 @@
         assertNull(column.getDefaultValue());
         assertEquals("The primary key",
                      column.getDescription());
-
+        assertEquals("javaId", column.getJavaName());
         assertEquals(
             "  <database name=\"test\">\n" +
             "    <table name=\"SomeTable\" description=\"Some table\">\n" +
-            "      <column name=\"ID\" primaryKey=\"true\" required=\"true\" type=\"INTEGER\"
autoIncrement=\"false\" description=\"The primary key\"/>\n" +
+            "      <column name=\"ID\" primaryKey=\"true\" required=\"true\" type=\"INTEGER\"
autoIncrement=\"false\" description=\"The primary key\" javaName=\"javaId\"/>\n" +
             "    </table>\n" +
             "  </database>\n",
             writeModel(model));



Mime
View raw message