Class KafkaConditions
java.lang.Object
org.springframework.kafka.test.assertj.KafkaConditions
AssertJ custom
Conditions.- Author:
- Artem Bilan, Gary Russell, Biju Kunjummen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic <K> org.assertj.core.api.Condition<org.apache.kafka.clients.consumer.ConsumerRecord<K, ?>> key(K key) static <K,V> org.assertj.core.api.Condition <org.apache.kafka.clients.consumer.ConsumerRecord<K, V>> keyValue(K key, V value) static org.assertj.core.api.Condition<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>> partition(int partition) static org.assertj.core.api.Condition<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>> timestamp(long value) static org.assertj.core.api.Condition<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>> timestamp(org.apache.kafka.common.record.TimestampType type, long value) static <V> org.assertj.core.api.Condition<org.apache.kafka.clients.consumer.ConsumerRecord<?, V>> value(V value)
-
Method Details
-
key
public static <K> org.assertj.core.api.Condition<org.apache.kafka.clients.consumer.ConsumerRecord<K,?>> key(K key) - Type Parameters:
K- the type.- Parameters:
key- the key.- Returns:
- a Condition that matches the key in a consumer record.
-
value
public static <V> org.assertj.core.api.Condition<org.apache.kafka.clients.consumer.ConsumerRecord<?,V>> value(V value) - Type Parameters:
V- the type.- Parameters:
value- the value.- Returns:
- a Condition that matches the value in a consumer record.
-
keyValue
public static <K,V> org.assertj.core.api.Condition<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>> keyValue(K key, V value) - Type Parameters:
K- the key type.V- the value type.- Parameters:
key- the key.value- the value.- Returns:
- a Condition that matches the key in a consumer record.
- Since:
- 2.2.12
-
timestamp
public static org.assertj.core.api.Condition<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>> timestamp(long value) - Parameters:
value- the timestamp.- Returns:
- a Condition that matches the timestamp value in a consumer record.
- Since:
- 1.3
-
timestamp
public static org.assertj.core.api.Condition<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>> timestamp(org.apache.kafka.common.record.TimestampType type, long value) - Parameters:
type- the type of timestampvalue- the timestamp.- Returns:
- a Condition that matches the timestamp value in a consumer record.
- Since:
- 1.3
-
partition
public static org.assertj.core.api.Condition<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>> partition(int partition) - Parameters:
partition- the partition.- Returns:
- a Condition that matches the partition in a consumer record.
-