Skip to content

Commit 1887e89

Browse files
authored
chore(next): Fix test, artifactid and docs (#118)
1 parent a75bb83 commit 1887e89

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

async/async-kafka/src/test/java/org/reactivecommons/async/kafka/converters/json/KafkaJacksonMessageConverterTest.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import com.fasterxml.jackson.databind.ObjectMapper;
66
import io.cloudevents.CloudEvent;
77
import io.cloudevents.core.builder.CloudEventBuilder;
8-
import io.cloudevents.jackson.JsonCloudEventData;
98
import lombok.AllArgsConstructor;
109
import lombok.Data;
1110
import lombok.NoArgsConstructor;
@@ -18,7 +17,7 @@
1817

1918
import java.net.URI;
2019
import java.time.OffsetDateTime;
21-
import java.time.format.DateTimeFormatter;
20+
import java.util.Date;
2221
import java.util.UUID;
2322

2423
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -69,13 +68,15 @@ void shouldSerializeCloudEvent() throws JsonProcessingException {
6968
"\",\"source\":\"https://reactivecommons.org/events\",\"type\":\"test\"," +
7069
"\"datacontenttype\":\"application/json\",\"time\":\"" + dateTime +
7170
"\",\"data\":{\"name\":\"name\",\"age\":1}}";
71+
JsonCloudEvent expectedJsonNode = objectMapper.readValue(expectedJson, JsonCloudEvent.class);
7272
// Act
7373
Message message = converter.toMessage(testCloudEvent);
7474
// Assert
7575
assertEquals("test", message.getProperties().getTopic());
7676
assertEquals(id, message.getProperties().getKey());
7777
assertEquals("application/cloudevents+json", message.getProperties().getContentType());
78-
assertEquals(expectedJson, new String(message.getBody()));
78+
JsonCloudEvent receivedJsonNode = objectMapper.readValue(new String(message.getBody()), JsonCloudEvent.class);
79+
assertEquals(expectedJsonNode, receivedJsonNode);
7980
}
8081

8182
@Data
@@ -85,4 +86,15 @@ public static class MyEvent {
8586
private String name;
8687
private int age;
8788
}
89+
90+
@Data
91+
public static class JsonCloudEvent {
92+
private String specversion;
93+
private String id;
94+
private String source;
95+
private String type;
96+
private String datacontenttype;
97+
private Date time;
98+
private MyEvent data;
99+
}
88100
}

docs/docusaurus.config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ const config = {
9797
label: 'Reactive Commons',
9898
to: '/docs/reactive-commons/getting-started',
9999
},
100-
{
101-
label: 'Reactive Commons EDA',
102-
to: '/docs/reactive-commons-eda/getting-started',
103-
},
104100
],
105101
},
106102
{

starters/async-rabbit-starter/async-commons-rabbit-starter.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ext {
2-
artifactId = 'async-commons-rabbit-starter-eda'
3-
artifactDescription = 'Async Commons Starter EDA'
2+
artifactId = 'async-commons-rabbit-starter'
3+
artifactDescription = 'Async Commons Starter'
44
}
55

66
dependencies {

0 commit comments

Comments
 (0)