]> source.dussan.org Git - sonarqube.git/commitdiff
Remove unused constants
authorSimon Brandhof <simon.brandhof@gmail.com>
Fri, 29 Jun 2012 14:27:54 +0000 (16:27 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Mon, 2 Jul 2012 11:20:27 +0000 (13:20 +0200)
sonar-core/src/test/java/org/sonar/core/persistence/dialect/DialectUtilsTest.java
sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java

index ffca9b8b8cc7d532dd6bd42e266cad518c83ac48..0d75ddc8070fb017db48628ef80f95f82e53352d 100644 (file)
  */
 package org.sonar.core.persistence.dialect;
 
-import org.hamcrest.core.Is;
 import org.junit.Test;
-import org.sonar.api.database.DatabaseProperties;
 import org.sonar.api.utils.SonarException;
 
-import static org.junit.Assert.assertThat;
+import static org.fest.assertions.Assertions.assertThat;
 
 public class DialectUtilsTest {
 
   @Test
   public void testFindById() {
-    Dialect d = DialectUtils.find(DatabaseProperties.DIALECT_MYSQL, null);
-    assertThat(d, Is.is(MySql.class));
+    Dialect d = DialectUtils.find("mysql", null);
+    assertThat(d).isInstanceOf(MySql.class);
   }
 
   @Test
   public void testFindByJdbcUrl() {
     Dialect d = DialectUtils.find(null, "jdbc:mysql:foo:bar");
-    assertThat(d, Is.is(MySql.class));
+    assertThat(d).isInstanceOf(MySql.class);
   }
 
   @Test(expected = SonarException.class)
index b3e7aebe13926f4e3071476494f1eee31ab8d3a9..f84f969195014e8c7d1c3321cfa6793eb6036de5 100644 (file)
@@ -23,7 +23,6 @@ public interface DatabaseProperties {
 
   int MAX_TEXT_SIZE = 16777215;
 
-  String PROP_ISOLATION = "sonar.jdbc.defaultTransactionIsolation";
   String PROP_URL = "sonar.jdbc.url";
   String PROP_URL_DEFAULT_VALUE = "jdbc:derby://localhost:1527/sonar";
   String PROP_DRIVER = "sonar.jdbc.driverClassName";
@@ -37,15 +36,7 @@ public interface DatabaseProperties {
   String PROP_HIBERNATE_HBM2DLL = "sonar.jdbc.hibernate.hbm2ddl";
   String PROP_HIBERNATE_GENERATE_STATISTICS = "sonar.jdbc.hibernate.generate_statistics";
   String PROP_DIALECT = "sonar.jdbc.dialect";
-  String PROP_DIALECT_CLASS = "sonar.jdbc.dialectClass";
-  String PROP_EMBEDDED_PORT = "sonar.embeddedDatabase.port";
   String PROP_HIBERNATE_DEFAULT_SCHEMA = "sonar.hibernate.default_schema";
 
   String PROP_EMBEDDED_DATA_DIR = "sonar.embeddedDatabase.dataDir";
-  String DIALECT_DERBY = "derby";
-  String DIALECT_MYSQL = "mysql";
-  String DIALECT_POSTGRESQL = "postgresql";
-  String DIALECT_ORACLE = "oracle";
-  String DIALECT_DB2 = "db2";
-  String DIALECT_MSSQL = "mssql";
 }
\ No newline at end of file