
app.cash.backfila.client.misk.testing.InstanceSnapshotAssert.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of client-misk-testing Show documentation
Show all versions of client-misk-testing Show documentation
Backfila misk client library test fixtures
package app.cash.backfila.client.misk.testing
import app.cash.backfila.client.misk.internal.PartitionCursor
import org.assertj.core.api.AbstractAssert
class PartitionCursorAssert(
private val partitionCursor: PartitionCursor
) : AbstractAssert(partitionCursor, PartitionCursorAssert::class.java) {
fun isDone(): PartitionCursorAssert {
if (!partitionCursor.done) {
failWithMessage(
"Expected the backfill partition ${partitionCursor.partitionName} " +
"to be done but it isn't. Cursor $partitionCursor"
)
}
return this // Return the current assertion for method chaining.
}
fun isNotDone(): PartitionCursorAssert {
if (partitionCursor.done) {
failWithMessage(
"Expected the backfill partition ${partitionCursor.partitionName} " +
"to be not done but it is. Cursor $partitionCursor"
)
}
return this // Return the current assertion for method chaining.
}
}
fun assertThat(partitionCursor: PartitionCursor): PartitionCursorAssert {
return PartitionCursorAssert(partitionCursor)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy