From: Kai Moritz Date: Sun, 14 Aug 2022 13:40:39 +0000 (+0200) Subject: Methode zu prüfen der Fachlogik in `RecordGenerator` ergänzt und angebunden X-Git-Tag: sumup-adder---lvm-2-tage~9^2~2 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=4b19a0061b88863c015424088f429b6998557dc8;p=demos%2Fkafka%2Ftraining Methode zu prüfen der Fachlogik in `RecordGenerator` ergänzt und angebunden --- diff --git a/src/test/java/de/juplo/kafka/GenericApplicationTests.java b/src/test/java/de/juplo/kafka/GenericApplicationTests.java index 9175e52..ebad5a8 100644 --- a/src/test/java/de/juplo/kafka/GenericApplicationTests.java +++ b/src/test/java/de/juplo/kafka/GenericApplicationTests.java @@ -98,6 +98,8 @@ abstract class GenericApplicationTests assertThatExceptionOfType(IllegalStateException.class) .isThrownBy(() -> endlessConsumer.exitStatus()) .describedAs("Consumer should still be running"); + + recordGenerator.assertBusinessLogic(); } @Test @@ -133,6 +135,8 @@ abstract class GenericApplicationTests assertThat(endlessConsumer.exitStatus()) .describedAs("Consumer should have exited abnormally") .containsInstanceOf(RecordDeserializationException.class); + + recordGenerator.assertBusinessLogic(); } @Test @@ -168,6 +172,8 @@ abstract class GenericApplicationTests assertThat(endlessConsumer.exitStatus()) .describedAs("Consumer should have exited abnormally") .containsInstanceOf(RuntimeException.class); + + recordGenerator.assertBusinessLogic(); } @@ -255,6 +261,11 @@ abstract class GenericApplicationTests { return true; } + + default void assertBusinessLogic() + { + log.debug("No business-logic to assert"); + } } void sendMessage(ProducerRecord record)