Add the occurred exception to the kafka error validations
osoykan opened this issue · 1 comments
osoykan commented
test("when failing event is published then it should be validated") {
data class FailingEvent(val id: Long)
TestSystem.validate {
kafka {
publish("trendyol.stove.service.product.failing.0", FailingEvent(5L))
shouldBeFailedOnCondition<FailingEvent> { actual, exception ->
actual.id == 5L && exception is BusinessException
}
shouldBeFailed(message = FailingEvent(5L), exception = BusinessException("Failing product create event"))
}
}
}