public class OutputVerifier extends Object
TopologyTestDriver
Constructor and Description |
---|
OutputVerifier() |
Modifier and Type | Method and Description |
---|---|
static <K,V> void |
compareKeyValue(ProducerRecord<K,V> record,
K expectedKey,
V expectedValue)
Compares a
ProducerRecord with the provided key and value and throws an AssertionError if the
ProducerRecord 's key or value is not equal to the expected key or value. |
static <K,V> void |
compareKeyValue(ProducerRecord<K,V> record,
ProducerRecord<K,V> expectedRecord)
Compares the keys and values of two
ProducerRecord 's and throws an AssertionError if the keys or
values are not equal to each other. |
static <K,V> void |
compareKeyValueHeaders(ProducerRecord<K,V> record,
K expectedKey,
V expectedValue,
Headers expectedHeaders)
Compares a
ProducerRecord with the provided key, value, and headers and throws an
AssertionError if the ProducerRecord 's key, value, or headers is not equal to the expected key,
value, or headers. |
static <K,V> void |
compareKeyValueHeaders(ProducerRecord<K,V> record,
ProducerRecord<K,V> expectedRecord)
Compares the keys, values, and headers of two
ProducerRecord 's and throws an AssertionError if
the keys, values, or headers are not equal to each other. |
static <K,V> void |
compareKeyValueHeadersTimestamp(ProducerRecord<K,V> record,
K expectedKey,
V expectedValue,
Headers expectedHeaders,
long expectedTimestamp)
Compares a
ProducerRecord with the provided key, value, headers, and timestamp and throws an
AssertionError if the ProducerRecord 's key, value, headers, or timestamp is not equal to the expected key,
value, headers, or timestamp. |
static <K,V> void |
compareKeyValueHeadersTimestamp(ProducerRecord<K,V> record,
ProducerRecord<K,V> expectedRecord)
Compares the keys, values, headers, and timestamp of two
ProducerRecord 's and throws an AssertionError if
the keys, values, headers, or timestamps are not equal to each other. |
static <K,V> void |
compareKeyValueTimestamp(ProducerRecord<K,V> record,
K expectedKey,
V expectedValue,
long expectedTimestamp)
Compares a
ProducerRecord with the provided key, value, and timestamp and throws an
AssertionError if the ProducerRecord 's key, value, or timestamp is not equal to the expected key,
value, or timestamp. |
static <K,V> void |
compareKeyValueTimestamp(ProducerRecord<K,V> record,
ProducerRecord<K,V> expectedRecord)
Compares the keys, values, and timestamps of two
ProducerRecord 's and throws an AssertionError if
the keys, values, or timestamps are not equal to each other. |
static <K,V> void |
compareValue(ProducerRecord<K,V> record,
ProducerRecord<K,V> expectedRecord)
Compares the values of two
ProducerRecord 's and throws an AssertionError if they are not equal to
each other. |
static <K,V> void |
compareValue(ProducerRecord<K,V> record,
V expectedValue)
Compares a
ProducerRecord with the provided value and throws an AssertionError if the
ProducerRecord 's value is not equal to the expected value. |
static <K,V> void |
compareValueHeaders(ProducerRecord<K,V> record,
ProducerRecord<K,V> expectedRecord)
Compares the values and headers of two
ProducerRecord 's and throws an AssertionError if the
values or headers are not equal to each other. |
static <K,V> void |
compareValueHeaders(ProducerRecord<K,V> record,
V expectedValue,
Headers expectedHeaders)
Compares a
ProducerRecord with the provided value and headers and throws an AssertionError if
the ProducerRecord 's value or headers is not equal to the expected value or headers. |
static <K,V> void |
compareValueTimestamp(ProducerRecord<K,V> record,
ProducerRecord<K,V> expectedRecord)
Compares the values and timestamps of two
ProducerRecord 's and throws an AssertionError if the
values or timestamps are not equal to each other. |
static <K,V> void |
compareValueTimestamp(ProducerRecord<K,V> record,
V expectedValue,
long expectedTimestamp)
Compares a
ProducerRecord with the provided value and timestamp and throws an AssertionError if
the ProducerRecord 's value or timestamp is not equal to the expected value or timestamp. |
public static <K,V> void compareValue(ProducerRecord<K,V> record, V expectedValue) throws AssertionError
ProducerRecord
with the provided value and throws an AssertionError
if the
ProducerRecord
's value is not equal to the expected value.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedValue
- the expected value of the ProducerRecord
AssertionError
- if ProducerRecord
's value is not equal to expectedValue
public static <K,V> void compareValue(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
ProducerRecord
's and throws an AssertionError
if they are not equal to
each other.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedRecord
- a ProducerRecord
for verificationAssertionError
- if ProducerRecord
's value is not equal to expectedRecord
's valuepublic static <K,V> void compareKeyValue(ProducerRecord<K,V> record, K expectedKey, V expectedValue) throws AssertionError
ProducerRecord
with the provided key and value and throws an AssertionError
if the
ProducerRecord
's key or value is not equal to the expected key or value.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedKey
- the expected key of the ProducerRecord
expectedValue
- the expected value of the ProducerRecord
AssertionError
- if ProducerRecord
's key or value is not equal to expectedKey
or expectedValue
public static <K,V> void compareKeyValue(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
ProducerRecord
's and throws an AssertionError
if the keys or
values are not equal to each other.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedRecord
- a ProducerRecord
for verificationAssertionError
- if ProducerRecord
's key or value is not equal to expectedRecord
's key or valuepublic static <K,V> void compareValueTimestamp(ProducerRecord<K,V> record, V expectedValue, long expectedTimestamp) throws AssertionError
ProducerRecord
with the provided value and timestamp and throws an AssertionError
if
the ProducerRecord
's value or timestamp is not equal to the expected value or timestamp.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedValue
- the expected value of the ProducerRecord
expectedTimestamp
- the expected timestamps of the ProducerRecord
AssertionError
- if ProducerRecord
's value or timestamp is not equal to expectedValue
or expectedTimestamp
public static <K,V> void compareValueTimestamp(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
ProducerRecord
's and throws an AssertionError
if the
values or timestamps are not equal to each other.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedRecord
- a ProducerRecord
for verificationAssertionError
- if ProducerRecord
's value or timestamp is not equal to expectedRecord
's value or timestamppublic static <K,V> void compareKeyValueTimestamp(ProducerRecord<K,V> record, K expectedKey, V expectedValue, long expectedTimestamp) throws AssertionError
ProducerRecord
with the provided key, value, and timestamp and throws an
AssertionError
if the ProducerRecord
's key, value, or timestamp is not equal to the expected key,
value, or timestamp.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedKey
- the expected key of the ProducerRecord
expectedValue
- the expected value of the ProducerRecord
expectedTimestamp
- the expected timestamp of the ProducerRecord
AssertionError
- if ProducerRecord
's key, value, timestamp is not equal to expectedKey
,
expectedValue
, or expectedTimestamps
public static <K,V> void compareKeyValueTimestamp(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
ProducerRecord
's and throws an AssertionError
if
the keys, values, or timestamps are not equal to each other.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedRecord
- a ProducerRecord
for verificationAssertionError
- if ProducerRecord
's key, value, or timestamp is not equal to
expectedRecord
's key, value, or timestamppublic static <K,V> void compareValueHeaders(ProducerRecord<K,V> record, V expectedValue, Headers expectedHeaders) throws AssertionError
ProducerRecord
with the provided value and headers and throws an AssertionError
if
the ProducerRecord
's value or headers is not equal to the expected value or headers.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedValue
- the expected value of the ProducerRecord
expectedHeaders
- the expected headers of the ProducerRecord
AssertionError
- if ProducerRecord
's value or headers is not equal to expectedValue
or expectedHeaders
public static <K,V> void compareValueHeaders(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
ProducerRecord
's and throws an AssertionError
if the
values or headers are not equal to each other.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedRecord
- a ProducerRecord
for verificationAssertionError
- if ProducerRecord
's value or headers is not equal to expectedRecord
's value or headerspublic static <K,V> void compareKeyValueHeaders(ProducerRecord<K,V> record, K expectedKey, V expectedValue, Headers expectedHeaders) throws AssertionError
ProducerRecord
with the provided key, value, and headers and throws an
AssertionError
if the ProducerRecord
's key, value, or headers is not equal to the expected key,
value, or headers.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedKey
- the expected key of the ProducerRecord
expectedValue
- the expected value of the ProducerRecord
expectedHeaders
- the expected headers of the ProducerRecord
AssertionError
- if ProducerRecord
's key, value, headers is not equal to expectedKey
,
expectedValue
, or expectedHeaders
public static <K,V> void compareKeyValueHeaders(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
ProducerRecord
's and throws an AssertionError
if
the keys, values, or headers are not equal to each other.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedRecord
- a ProducerRecord
for verificationAssertionError
- if ProducerRecord
's key, value, or headers is not equal to
expectedRecord
's key, value, or headerspublic static <K,V> void compareKeyValueHeadersTimestamp(ProducerRecord<K,V> record, K expectedKey, V expectedValue, Headers expectedHeaders, long expectedTimestamp) throws AssertionError
ProducerRecord
with the provided key, value, headers, and timestamp and throws an
AssertionError
if the ProducerRecord
's key, value, headers, or timestamp is not equal to the expected key,
value, headers, or timestamp.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedKey
- the expected key of the ProducerRecord
expectedValue
- the expected value of the ProducerRecord
expectedHeaders
- the expected headers of the ProducerRecord
expectedTimestamp
- the expected timestamp of the ProducerRecord
AssertionError
- if ProducerRecord
's key, value, headers is not equal to expectedKey
,
expectedValue
, or expectedHeaders
public static <K,V> void compareKeyValueHeadersTimestamp(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
ProducerRecord
's and throws an AssertionError
if
the keys, values, headers, or timestamps are not equal to each other.K
- the key typeV
- the value typerecord
- a output ProducerRecord
for verificationexpectedRecord
- a ProducerRecord
for verificationAssertionError
- if ProducerRecord
's key, value, headers, or timestamp is not equal to
expectedRecord
's key, value, headers, or timestamp