Align SQL Server-related class names with existing precedents
Closes gh-35181
This commit is contained in:
@@ -25,39 +25,39 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
|
||||
|
||||
/**
|
||||
* Tests for {@link MsSqlServerEnvironment}.
|
||||
* Tests for {@link SqlServerEnvironment}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
class MsSqlServerEnvironmentTests {
|
||||
class SqlServerEnvironmentTests {
|
||||
|
||||
@Test
|
||||
void createWhenHasNoPasswordThrowsException() {
|
||||
assertThatIllegalStateException().isThrownBy(() -> new MsSqlServerEnvironment(Collections.emptyMap()))
|
||||
assertThatIllegalStateException().isThrownBy(() -> new SqlServerEnvironment(Collections.emptyMap()))
|
||||
.withMessage("No MSSQL password found");
|
||||
}
|
||||
|
||||
@Test
|
||||
void getUsernameWhenHasNoMsSqlUser() {
|
||||
MsSqlServerEnvironment environment = new MsSqlServerEnvironment(Map.of("MSSQL_SA_PASSWORD", "secret"));
|
||||
SqlServerEnvironment environment = new SqlServerEnvironment(Map.of("MSSQL_SA_PASSWORD", "secret"));
|
||||
assertThat(environment.getUsername()).isEqualTo("SA");
|
||||
}
|
||||
|
||||
@Test
|
||||
void getPasswordWhenHasMsSqlSaPassword() {
|
||||
MsSqlServerEnvironment environment = new MsSqlServerEnvironment(Map.of("MSSQL_SA_PASSWORD", "secret"));
|
||||
SqlServerEnvironment environment = new SqlServerEnvironment(Map.of("MSSQL_SA_PASSWORD", "secret"));
|
||||
assertThat(environment.getPassword()).isEqualTo("secret");
|
||||
}
|
||||
|
||||
@Test
|
||||
void getPasswordWhenHasSaPassword() {
|
||||
MsSqlServerEnvironment environment = new MsSqlServerEnvironment(Map.of("SA_PASSWORD", "secret"));
|
||||
SqlServerEnvironment environment = new SqlServerEnvironment(Map.of("SA_PASSWORD", "secret"));
|
||||
assertThat(environment.getPassword()).isEqualTo("secret");
|
||||
}
|
||||
|
||||
@Test
|
||||
void getPasswordWhenHasMsSqlSaPasswordAndSaPasswordPrefersMsSqlSaPassword() {
|
||||
MsSqlServerEnvironment environment = new MsSqlServerEnvironment(
|
||||
SqlServerEnvironment environment = new SqlServerEnvironment(
|
||||
Map.of("MSSQL_SA_PASSWORD", "secret", "SA_PASSWORD", "not used"));
|
||||
assertThat(environment.getPassword()).isEqualTo("secret");
|
||||
}
|
||||
@@ -30,14 +30,13 @@ import org.springframework.util.ClassUtils;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Integration tests for {@link MsSqlServerJdbcDockerComposeConnectionDetailsFactory}
|
||||
* Integration tests for {@link SqlServerJdbcDockerComposeConnectionDetailsFactory}
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
class MsSqlServerJdbcDockerComposeConnectionDetailsFactoryIntegrationTests
|
||||
extends AbstractDockerComposeIntegrationTests {
|
||||
class SqlServerJdbcDockerComposeConnectionDetailsFactoryIntegrationTests extends AbstractDockerComposeIntegrationTests {
|
||||
|
||||
MsSqlServerJdbcDockerComposeConnectionDetailsFactoryIntegrationTests() {
|
||||
SqlServerJdbcDockerComposeConnectionDetailsFactoryIntegrationTests() {
|
||||
super("mssqlserver-compose.yaml");
|
||||
}
|
||||
|
||||
@@ -28,14 +28,14 @@ import org.springframework.r2dbc.core.DatabaseClient;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Integration tests for {@link MsSqlServerR2dbcDockerComposeConnectionDetailsFactory}
|
||||
* Integration tests for {@link SqlServerR2dbcDockerComposeConnectionDetailsFactory}
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
class MsSqlServerR2dbcDockerComposeConnectionDetailsFactoryIntegrationTests
|
||||
class SqlServerR2dbcDockerComposeConnectionDetailsFactoryIntegrationTests
|
||||
extends AbstractDockerComposeIntegrationTests {
|
||||
|
||||
MsSqlServerR2dbcDockerComposeConnectionDetailsFactoryIntegrationTests() {
|
||||
SqlServerR2dbcDockerComposeConnectionDetailsFactoryIntegrationTests() {
|
||||
super("mssqlserver-compose.yaml");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user