33 lines
991 B
Kotlin
33 lines
991 B
Kotlin
package solutions.bitbadger.documents.integration.postgresql
|
|
|
|
import org.junit.jupiter.api.DisplayName
|
|
import solutions.bitbadger.documents.integration.common.Definition
|
|
import kotlin.test.Test
|
|
|
|
/**
|
|
* PostgreSQL integration tests for the `Definition` object / `ensure*` connection extension functions
|
|
*/
|
|
@DisplayName("PostgreSQL - Definition")
|
|
class DefinitionIT {
|
|
|
|
@Test
|
|
@DisplayName("ensureTable creates table and index")
|
|
fun ensureTable() =
|
|
PgDB().use(Definition::ensureTable)
|
|
|
|
@Test
|
|
@DisplayName("ensureFieldIndex creates an index")
|
|
fun ensureFieldIndex() =
|
|
PgDB().use(Definition::ensureFieldIndex)
|
|
|
|
@Test
|
|
@DisplayName("ensureDocumentIndex creates a full index")
|
|
fun ensureDocumentIndexFull() =
|
|
PgDB().use(Definition::ensureDocumentIndexFull)
|
|
|
|
@Test
|
|
@DisplayName("ensureDocumentIndex creates an optimized index")
|
|
fun ensureDocumentIndexOptimized() =
|
|
PgDB().use(Definition::ensureDocumentIndexOptimized)
|
|
}
|