Permalink
Browse files

Remove unused constants

  • Loading branch information...
1 parent 44b9597 commit 6e2a854b1b28054d32b8d9c91c122f29a9487c99 @simonbrandhof simonbrandhof committed Jun 29, 2012
@@ -19,25 +19,23 @@
*/
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)
@@ -23,7 +23,6 @@
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 @@
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";
}

0 comments on commit 6e2a854

Please sign in to comment.