Not found a channel for assertk, so asking here (p...
# getting-started
p
Not found a channel for assertk, so asking here (please redirect if there is a more appropriate place) How to do the following 2 assertions with
warning.all {}
?
Copy code
assertThat(warning::severity).isEqualTo("alert")
assertThat(warning::eventType).isEqualTo("wind")
s
Off the top of my head, something like this:
Copy code
assertThat(warning).all {
  prop(Warning::severity).isEqualTo("alert")
  prop(Warning::eventType).isEqualTo("wind")
}
p
Thank you
Btw I am looking for an assertion library, which have something like
Copy code
warning.assert {
  severity == "alert"
  eventType == "wind"
}
Is there anything similar?
s
Have you tried kotest? It'd be something like
Copy code
assertSoftly(warning) {
  severity shouldBe "alert"
  eventType shouldBe "wind"
}
1