Hello, how is the best way to do this with kotest...
# kotest
s
Hello, how is the best way to do this with kotest?
Copy code
val item = turbineState.awaitItem()
item.showProgress.shouldBe(false)
item.selectedItem.shouldBe(-1)
item.filteredLocations.count().shouldBe(2)
I tried this code but is not working...
Copy code
turbineState.awaitItem().should {
   !it.showProgress &&
   it.selectedItem == -1 &&
   it.filteredLocations.count() == 2
}
e
something like
Copy code
turbineState.awaitItem().should {
   it.showProgress shouldBe false
   it.selectedItem shouldBe -1 
   it.filteredLocations shouldHaveSize 2
}
?
d
You can also use
assertSoftly(item) { showProgress shouldBe false..etc }
which changes the functionality a bit (does all the asserts and fails at the end, not just until one fails)
👍 2
s
Thank you both. It works.