Package io.debezium.converters
Class CloudEventsConverterTest
java.lang.Object
io.debezium.converters.CloudEventsConverterTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static org.apache.kafka.common.header.internals.RecordHeadersconvertHeadersFor(org.apache.kafka.connect.source.SourceRecord record) private static StringprettyJson(com.fasterxml.jackson.databind.JsonNode json) static voidshouldConvertToCloudEventsInAvro(org.apache.kafka.connect.source.SourceRecord record, String connectorName, String serverName, boolean hasTransaction) static voidshouldConvertToCloudEventsInAvroWithCustomCloudEventsSchemaName(org.apache.kafka.connect.source.SourceRecord record) static voidshouldConvertToCloudEventsInJson(org.apache.kafka.connect.source.SourceRecord record, boolean hasTransaction) static voidshouldConvertToCloudEventsInJson(org.apache.kafka.connect.source.SourceRecord record, boolean hasTransaction, Consumer<com.fasterxml.jackson.databind.JsonNode> furtherAssertions) static voidshouldConvertToCloudEventsInJsonWithDataAsAvro(org.apache.kafka.connect.source.SourceRecord record, boolean hasTransaction) static voidshouldConvertToCloudEventsInJsonWithDataAsAvro(org.apache.kafka.connect.source.SourceRecord record, String fieldName, boolean hasTransaction) static voidshouldConvertToCloudEventsInJsonWithDataAsAvroAndAllMetadataInHeaders(org.apache.kafka.connect.source.SourceRecord record, String connectorName, String serverName) static voidshouldConvertToCloudEventsInJsonWithIdFromHeaderAndGeneratedType(org.apache.kafka.connect.source.SourceRecord record, String connectorName, String serverName) static voidshouldConvertToCloudEventsInJsonWithMetadataAndIdAndTypeInHeaders(org.apache.kafka.connect.source.SourceRecord record, String connectorName, String serverName) static voidshouldConvertToCloudEventsInJsonWithoutExtensionAttributes(org.apache.kafka.connect.source.SourceRecord record) static voidshouldThrowExceptionWhenDeserializingNotCloudEventAvro(org.apache.kafka.connect.source.SourceRecord record) static voidshouldThrowExceptionWhenDeserializingNotCloudEventJson(org.apache.kafka.connect.source.SourceRecord record)
-
Constructor Details
-
CloudEventsConverterTest
public CloudEventsConverterTest()
-
-
Method Details
-
shouldConvertToCloudEventsInJson
public static void shouldConvertToCloudEventsInJson(org.apache.kafka.connect.source.SourceRecord record, boolean hasTransaction) -
shouldConvertToCloudEventsInJson
public static void shouldConvertToCloudEventsInJson(org.apache.kafka.connect.source.SourceRecord record, boolean hasTransaction, Consumer<com.fasterxml.jackson.databind.JsonNode> furtherAssertions) -
shouldConvertToCloudEventsInJsonWithDataAsAvro
public static void shouldConvertToCloudEventsInJsonWithDataAsAvro(org.apache.kafka.connect.source.SourceRecord record, boolean hasTransaction) -
shouldConvertToCloudEventsInJsonWithDataAsAvro
public static void shouldConvertToCloudEventsInJsonWithDataAsAvro(org.apache.kafka.connect.source.SourceRecord record, String fieldName, boolean hasTransaction) -
shouldConvertToCloudEventsInAvro
-
shouldConvertToCloudEventsInJsonWithMetadataAndIdAndTypeInHeaders
public static void shouldConvertToCloudEventsInJsonWithMetadataAndIdAndTypeInHeaders(org.apache.kafka.connect.source.SourceRecord record, String connectorName, String serverName) throws Exception - Throws:
Exception
-
shouldConvertToCloudEventsInJsonWithDataAsAvroAndAllMetadataInHeaders
public static void shouldConvertToCloudEventsInJsonWithDataAsAvroAndAllMetadataInHeaders(org.apache.kafka.connect.source.SourceRecord record, String connectorName, String serverName) throws Exception - Throws:
Exception
-
shouldConvertToCloudEventsInJsonWithIdFromHeaderAndGeneratedType
public static void shouldConvertToCloudEventsInJsonWithIdFromHeaderAndGeneratedType(org.apache.kafka.connect.source.SourceRecord record, String connectorName, String serverName) throws Exception - Throws:
Exception
-
shouldConvertToCloudEventsInJsonWithoutExtensionAttributes
public static void shouldConvertToCloudEventsInJsonWithoutExtensionAttributes(org.apache.kafka.connect.source.SourceRecord record) throws Exception - Throws:
Exception
-
shouldThrowExceptionWhenDeserializingNotCloudEventJson
public static void shouldThrowExceptionWhenDeserializingNotCloudEventJson(org.apache.kafka.connect.source.SourceRecord record) throws Exception - Throws:
Exception
-
shouldThrowExceptionWhenDeserializingNotCloudEventAvro
public static void shouldThrowExceptionWhenDeserializingNotCloudEventAvro(org.apache.kafka.connect.source.SourceRecord record) throws Exception - Throws:
Exception
-
shouldConvertToCloudEventsInAvroWithCustomCloudEventsSchemaName
public static void shouldConvertToCloudEventsInAvroWithCustomCloudEventsSchemaName(org.apache.kafka.connect.source.SourceRecord record) -
convertHeadersFor
private static org.apache.kafka.common.header.internals.RecordHeaders convertHeadersFor(org.apache.kafka.connect.source.SourceRecord record) throws IOException - Throws:
IOException
-
prettyJson
-