Kotlin, Kotest, Property Based Testing.
shouldThrow<IllegalArgumentException> { applicationService.createOutput(inputDto) } exception.message shouldBe "Amount '-1' must be greater or equal null." } @Test fun `throws exception if sum of positions amount is below zero`() { // given val inputDto = createValidInputDto().copy( positions =