trait TestDB extends AnyRef
Describes a database against which you can run TestKit tests. It includes features such as reading the configuration file, setting up a DB connection, removing DB files left over by a test run, etc.
- Source
- TestDB.scala
- Alphabetic
- By Inheritance
- TestDB
- AnyRef
- Any
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract type Profile <: BasicProfile
Abstract Value Members
- abstract val confName: String
The test database name
- abstract def createDB(): slick.basic.BasicProfile.Backend.Database
Create the Database object for this test database configuration
- abstract def dropUserArtifacts(implicit session: slick.basic.BasicProfile.Backend.Session): Unit
This method is called between individual test methods to remove all database artifacts that were created by the test.
- abstract val profile: Profile
The profile for the database
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ->[B](y: B): (TestDB, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def capabilities: Set[Capability]
The capabilities of the Slick profile, possibly modified for this test configuration.
- def cleanUpAfter(): Unit
This method is called to clean up after running all tests.
This method is called to clean up after running all tests. It defaults to cleanUpBefore().
- def cleanUpBefore(): Unit
This method is called to clean up before running all tests.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def confOptionalString(path: String): Option[String]
- def confString(path: String): String
- def confStrings(path: String): Seq[String]
- lazy val config: Config
The test configuration
- def ensuring(cond: (TestDB) => Boolean, msg: => Any): TestDB
- def ensuring(cond: (TestDB) => Boolean): TestDB
- def ensuring(cond: Boolean, msg: => Any): TestDB
- def ensuring(cond: Boolean): TestDB
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def isEnabled: Boolean
Check if this test database is enabled
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPersistent: Boolean
Indicates whether the database persists after closing the last connection
- def isShared: Boolean
Indicates whether the database's sessions have shared state.
Indicates whether the database's sessions have shared state. When a database is shared but not persistent, Testkit keeps a session open to make it persistent.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def testClasses: Seq[Class[_ <: AsyncTest[_ >: Null <: TestDB]]]
The tests to run for this configuration.
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from TestDB toStringFormat[TestDB] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (TestDB, B)
- Implicit
- This member is added by an implicit conversion from TestDB toArrowAssoc[TestDB] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.