Skip to content

Commit

Permalink
use new & syntax instead of with
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Sep 1, 2024
1 parent 9ea93df commit 59a0eac
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class H2JodaSupportSpec extends JodaSupportSpec {
}

abstract class TestContainerSpec extends JodaSupportSpec with ForAllTestContainer {
override def container: JdbcDatabaseContainer with Container
override def container: JdbcDatabaseContainer & Container
override def jdbcUrl = container.jdbcUrl
override def jdbcUser = container.username
override def jdbcPassword = container.password
Expand All @@ -284,7 +284,7 @@ object MySQLJodaSupportSpec {
}

class MySQLJodaSupportSpec extends TestContainerSpec {
override val container: JdbcDatabaseContainer with Container = MySQLContainer(
override val container: JdbcDatabaseContainer & Container = MySQLContainer(
configurationOverride = "test-mysql-conf",
mysqlImageVersion = DockerImageName.parse(MySQLJodaSupportSpec.mySQLDockerImageName)
)
Expand All @@ -295,15 +295,15 @@ class MySQLJodaSupportSpec extends TestContainerSpec {
}

class MySQLJodaSupportWithoutCalenderSpec extends TestContainerSpec {
override val container: JdbcDatabaseContainer with Container = MySQLContainer(mysqlImageVersion = DockerImageName.parse(MySQLJodaSupportSpec.mySQLDockerImageName))
override val container: JdbcDatabaseContainer & Container = MySQLContainer(mysqlImageVersion = DockerImageName.parse(MySQLJodaSupportSpec.mySQLDockerImageName))
override def jdbcDriver = "com.mysql.jdbc.Driver"
override val driver: JdbcProfile = MySQLProfile
override val jodaSupport: GenericJodaSupport = new GenericJodaSupport(MySQLProfile, _ => None)
override val isWithoutCalender = true
}

class PostgresJodaSupportSpec extends TestContainerSpec {
override val container: JdbcDatabaseContainer with Container = PostgreSQLContainer()
override val container: JdbcDatabaseContainer & Container = PostgreSQLContainer()
override def jdbcDriver = "org.postgresql.Driver"
override val driver: JdbcProfile = PostgresProfile
override val jodaSupport: GenericJodaSupport = PostgresJodaSupport
Expand Down

0 comments on commit 59a0eac

Please sign in to comment.