Merge pull request #23762 from izeye

* pr/23762:
  Polish assertions
  Polish

Closes gh-23762
pull/23766/head
Stephane Nicoll 4 years ago
commit 21f2b95a64

@ -103,7 +103,7 @@ class DataSourcePropertiesTests {
DataSourceProperties properties = new DataSourceProperties(); DataSourceProperties properties = new DataSourceProperties();
properties.setUsername(""); properties.setUsername("");
properties.afterPropertiesSet(); properties.afterPropertiesSet();
assertThat(properties.getUsername()); assertThat(properties.getUsername()).isEqualTo("");
assertThat(properties.determineUsername()).isEqualTo("sa"); assertThat(properties.determineUsername()).isEqualTo("sa");
} }
@ -112,7 +112,7 @@ class DataSourcePropertiesTests {
DataSourceProperties properties = new DataSourceProperties(); DataSourceProperties properties = new DataSourceProperties();
properties.setUsername(null); properties.setUsername(null);
properties.afterPropertiesSet(); properties.afterPropertiesSet();
assertThat(properties.getUsername()); assertThat(properties.getUsername()).isNull();
assertThat(properties.determineUsername()).isEqualTo("sa"); assertThat(properties.determineUsername()).isEqualTo("sa");
} }

@ -140,7 +140,7 @@ public enum EmbeddedDatabaseConnection {
* database type. * database type.
* @param driverClass the driver class * @param driverClass the driver class
* @return true if the driver class is one of the embedded types * @return true if the driver class is one of the embedded types
* @deprecated since 2.3.5 in favor of {@link #isEmbedded(String, String)} * @deprecated since 2.4.0 in favor of {@link #isEmbedded(String, String)}
*/ */
@Deprecated @Deprecated
public static boolean isEmbedded(String driverClass) { public static boolean isEmbedded(String driverClass) {
@ -151,8 +151,9 @@ public enum EmbeddedDatabaseConnection {
* Convenience method to determine if a given driver class name and url represent an * Convenience method to determine if a given driver class name and url represent an
* embedded database type. * embedded database type.
* @param driverClass the driver class * @param driverClass the driver class
* @param url the jdbc url (can be {@code null)} * @param url the jdbc url (can be {@code null})
* @return true if the driver class and url refer to an embedded database * @return true if the driver class and url refer to an embedded database
* @since 2.4.0
*/ */
public static boolean isEmbedded(String driverClass, String url) { public static boolean isEmbedded(String driverClass, String url) {
if (driverClass == null) { if (driverClass == null) {

Loading…
Cancel
Save