Skip to content

chore(next): Fix test, artifactid and docs #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import io.cloudevents.CloudEvent;
import io.cloudevents.core.builder.CloudEventBuilder;
import io.cloudevents.jackson.JsonCloudEventData;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
Expand All @@ -18,7 +17,7 @@

import java.net.URI;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.UUID;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand Down Expand Up @@ -69,13 +68,15 @@ void shouldSerializeCloudEvent() throws JsonProcessingException {
"\",\"source\":\"https://reactivecommons.org/events\",\"type\":\"test\"," +
"\"datacontenttype\":\"application/json\",\"time\":\"" + dateTime +
"\",\"data\":{\"name\":\"name\",\"age\":1}}";
JsonCloudEvent expectedJsonNode = objectMapper.readValue(expectedJson, JsonCloudEvent.class);
// Act
Message message = converter.toMessage(testCloudEvent);
// Assert
assertEquals("test", message.getProperties().getTopic());
assertEquals(id, message.getProperties().getKey());
assertEquals("application/cloudevents+json", message.getProperties().getContentType());
assertEquals(expectedJson, new String(message.getBody()));
JsonCloudEvent receivedJsonNode = objectMapper.readValue(new String(message.getBody()), JsonCloudEvent.class);
assertEquals(expectedJsonNode, receivedJsonNode);
}

@Data
Expand All @@ -85,4 +86,15 @@ public static class MyEvent {
private String name;
private int age;
}

@Data
public static class JsonCloudEvent {
private String specversion;
private String id;
private String source;
private String type;
private String datacontenttype;
private Date time;
private MyEvent data;
}
}
4 changes: 0 additions & 4 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ const config = {
label: 'Reactive Commons',
to: '/docs/reactive-commons/getting-started',
},
{
label: 'Reactive Commons EDA',
to: '/docs/reactive-commons-eda/getting-started',
},
],
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ext {
artifactId = 'async-commons-rabbit-starter-eda'
artifactDescription = 'Async Commons Starter EDA'
artifactId = 'async-commons-rabbit-starter'
artifactDescription = 'Async Commons Starter'
}

dependencies {
Expand Down
Loading