cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r407360 - in /incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne: dba/sqlserver/SQLServerSnifferTst.java unit/SQLServerStackAdapter.java
Date Wed, 17 May 2006 20:01:38 GMT
Author: aadamchik
Date: Wed May 17 13:01:37 2006
New Revision: 407360

URL: http://svn.apache.org/viewvc?rev=407360&view=rev
Log:
fixing SQLServer adapter assertions as SQLServer 2005 does support generated keys

Modified:
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/dba/sqlserver/SQLServerSnifferTst.java
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/unit/SQLServerStackAdapter.java

Modified: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/dba/sqlserver/SQLServerSnifferTst.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/dba/sqlserver/SQLServerSnifferTst.java?rev=407360&r1=407359&r2=407360&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/dba/sqlserver/SQLServerSnifferTst.java
(original)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/dba/sqlserver/SQLServerSnifferTst.java
Wed May 17 13:01:37 2006
@@ -88,21 +88,11 @@
         AccessStackAdapter testAdapter = getAccessStackAdapter();
         boolean sqlServer = testAdapter instanceof SQLServerStackAdapter;
 
-        if (!sqlServer) {
-            assertNull(adapter);
-            return;
-        }
-
-        String driver = getConnectionInfo().getJdbcDriver();
-        boolean msDriver = driver != null && driver.startsWith("com.microsoft.");
-
-        assertTrue(adapter instanceof SQLServerAdapter);
-
-        if (msDriver) {
-            assertFalse(adapter.supportsGeneratedKeys());
+        if (sqlServer) {
+            assertNotNull(adapter);
         }
         else {
-            assertTrue(adapter.supportsGeneratedKeys());
+            assertNull(adapter);
         }
     }
 }

Modified: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/unit/SQLServerStackAdapter.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/unit/SQLServerStackAdapter.java?rev=407360&r1=407359&r2=407360&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/unit/SQLServerStackAdapter.java
(original)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/unit/SQLServerStackAdapter.java
Wed May 17 13:01:37 2006
@@ -80,5 +80,4 @@
             ((JdbcAdapter) getAdapter()).setSupportsGeneratedKeys(false);
         }
     }
-
 }



Mime
View raw message