File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
core/src/main/java/io/cloudevents/core/format
formats/avro-compact/src/test/java/io/cloudevents/avro/compact Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ public enum ContentType {
45
45
* The content type for transports sending cloudevents in the protocol buffer format.
46
46
*/
47
47
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" ),
48
52
/**
49
53
* The content type for transports sending cloudevents in XML format.
50
54
*/
Original file line number Diff line number Diff line change 28
28
import java .time .ZoneOffset ;
29
29
import java .util .Collections ;
30
30
31
+ import static org .junit .jupiter .api .Assertions .assertArrayEquals ;
31
32
import static org .junit .jupiter .api .Assertions .assertEquals ;
32
33
import static org .junit .jupiter .api .Assertions .assertNotNull ;
33
34
@@ -67,5 +68,10 @@ void format() {
67
68
68
69
assertEquals (event , deserialized );
69
70
71
+ byte [] reserialized = format .serialize (deserialized );
72
+
73
+ assertArrayEquals (serialized , reserialized );
74
+
75
+
70
76
}
71
77
}
You can’t perform that action at this time.
0 commit comments