Add delete functions
This commit is contained in:
49
src/integration-test/kotlin/postgresql/DeleteIT.kt
Normal file
49
src/integration-test/kotlin/postgresql/DeleteIT.kt
Normal file
@@ -0,0 +1,49 @@
|
||||
package solutions.bitbadger.documents.postgresql
|
||||
|
||||
import org.junit.jupiter.api.DisplayName
|
||||
import solutions.bitbadger.documents.common.Delete
|
||||
import kotlin.test.Test
|
||||
|
||||
@DisplayName("PostgreSQL - Delete")
|
||||
class DeleteIT {
|
||||
|
||||
@Test
|
||||
@DisplayName("byId deletes a matching ID")
|
||||
fun byIdMatch() =
|
||||
PgDB().use(Delete::byIdMatch)
|
||||
|
||||
@Test
|
||||
@DisplayName("byId succeeds when no ID matches")
|
||||
fun byIdNoMatch() =
|
||||
PgDB().use(Delete::byIdNoMatch)
|
||||
|
||||
@Test
|
||||
@DisplayName("byFields deletes matching documents")
|
||||
fun byFieldsMatch() =
|
||||
PgDB().use(Delete::byFieldsMatch)
|
||||
|
||||
@Test
|
||||
@DisplayName("byFields succeeds when no documents match")
|
||||
fun byFieldsNoMatch() =
|
||||
PgDB().use(Delete::byFieldsNoMatch)
|
||||
|
||||
@Test
|
||||
@DisplayName("byContains deletes matching documents")
|
||||
fun byContainsMatch() =
|
||||
PgDB().use(Delete::byContainsMatch)
|
||||
|
||||
@Test
|
||||
@DisplayName("byContains succeeds when no documents match")
|
||||
fun byContainsNoMatch() =
|
||||
PgDB().use(Delete::byContainsNoMatch)
|
||||
|
||||
@Test
|
||||
@DisplayName("byJsonPath deletes matching documents")
|
||||
fun byJsonPathMatch() =
|
||||
PgDB().use(Delete::byJsonPathMatch)
|
||||
|
||||
@Test
|
||||
@DisplayName("byJsonPath succeeds when no documents match")
|
||||
fun byJsonPathNoMatch() =
|
||||
PgDB().use(Delete::byJsonPathNoMatch)
|
||||
}
|
||||
Reference in New Issue
Block a user