8000 ok · cloudevents/sdk-java@0d853ab · GitHub
[go: up one dir, main page]

Skip to content

Commit 0d853ab

Browse files
committed
ok
Signed-off-by: Alex Collins <alexec@users.noreply.github.com>
1 parent c080666 commit 0d853ab

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

core/src/main/java/io/cloudevents/core/format/ContentType.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public enum ContentType {
4545
* The content type for transports sending cloudevents in the protocol buffer format.
4646
*/
4747
PROTO("application/cloudevents+protobuf"),
48+
/**
49+
* The content type for transports sending cloudevents in the compact Avro format.
50+
*/
51+
AVRO_COMPACT("application/cloudevents+avrocompact"),
4852
/**
4953
* The content type for transports sending cloudevents in XML format.
5054
*/

formats/avro-compact/src/test/java/io/cloudevents/avro/compact/AvroCompactFormatTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.time.ZoneOffset;
2929
import java.util.Collections;
3030

31+
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
3132
import static org.junit.jupiter.api.Assertions.assertEquals;
3233
import static org.junit.jupiter.api.Assertions.assertNotNull;
3334

@@ -67,5 +68,10 @@ void format() {
6768

6869
assertEquals(event, deserialized);
6970

71+
byte[] reserialized = format.serialize(deserialized);
72+
73+
assertArrayEquals(serialized, reserialized);
74+
75+
7076
}
7177
}

0 commit comments

Comments
 (0)
0