Skip to content

Commit

Permalink
Renamed predicate into testExecution for DbMock
Browse files Browse the repository at this point in the history
  • Loading branch information
davidepalladino-apuliasoft committed Jan 27, 2025
1 parent 02ecdf1 commit d1fd408
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ interface DbMock : AutoCloseable {
}

fun <R> usePopulated(
predicate: (DbMock) -> R,
testExecution: (DbMock) -> R,
values: List<Map<String, Any>>
) = this.use {
val queries = listOf(it.createTable(), it.populateTable(values))
execute(queries)
predicate(it)
testExecution(it)
}

fun <R> usePopulated(predicate: (DbMock) -> R) = this.use {
fun <R> usePopulated(testExecution: (DbMock) -> R) = this.use {
val queries = listOf(it.createTable(), it.populateTable(emptyList()))
execute(queries)
predicate(it)
testExecution(it)
}

override fun close() {
Expand Down

0 comments on commit d1fd408

Please sign in to comment.