+++ /dev/null
-package de.juplo.kafka;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.DisplayName;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.MethodSource;
-import org.junit.jupiter.params.provider.ValueSource;
-
-import java.util.Arrays;
-import java.util.stream.IntStream;
-import java.util.stream.Stream;
-
-import static org.assertj.core.api.Assertions.*;
-
-
-public class MessageTest
-{
- ObjectMapper mapper = new ObjectMapper();
-
- @Test
- @DisplayName("Deserialize a MessageAddNumber message")
- public void testDeserializeMessageAddNumber()
- {
- Assertions.assertDoesNotThrow(() -> mapper.readValue("{\"next\":42}", MessageAddNumber.class));
- Assertions.assertDoesNotThrow(() -> mapper.readValue("{\"number\":666,\"next\":42}", MessageAddNumber.class));
- }
-
- @Test
- @DisplayName("Deserialize a MessageCalculateSum message")
- public void testDeserializeMessageCalculateSum() throws JsonProcessingException
- {
- Assertions.assertDoesNotThrow(() -> mapper.readValue("{}", MessageCalculateSum.class));
- Assertions.assertDoesNotThrow(() -> mapper.readValue("{\"number\":666}", MessageCalculateSum.class));
- }
-}