#2342 - Rename Database.getName() to Database.name() with deprecation

This commit is contained in:
Rob Bygrave
2021-09-02 22:41:51 +12:00
parent 6311d0bf4e
commit f770b66f42
15 changed files with 24 additions and 16 deletions
@@ -348,7 +348,7 @@ public class TDSpiEbeanServer implements SpiEbeanServer {
}
@Override
public String getName() {
public String name() {
return name;
}
@@ -194,7 +194,7 @@ public class TestQueryFindIterate extends BaseTestCase {
});
if (!DB.getDefault().getName().equals("h2")) {
if (!DB.getDefault().name().equals("h2")) {
// MySql allows the query with type conversion?
throw new PersistenceException("H2 does expected thing but MySql does not");
}
@@ -83,7 +83,7 @@ public class TestCustomerFinder extends BaseTestCase {
assertThat(customer.getId()).isEqualTo(customer1.getId());
assertThat(customer.getName()).isEqualTo(customer1.getName());
assertThat(Customer.find.db().getName()).isEqualTo(DB.getDefault().getName());
assertThat(Customer.find.db().name()).isEqualTo(DB.getDefault().name());
}
@Test