Class KafkaConditions
- java.lang.Object
-
- org.springframework.kafka.test.assertj.KafkaConditions
-
public final class KafkaConditions extends java.lang.Object
AssertJ customCondition
s.- Author:
- Artem Bilan, Gary Russell, Biju Kunjummen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KafkaConditions.ConsumerRecordKeyCondition<K>
static class
KafkaConditions.ConsumerRecordKeyValueCondition<K,V>
static class
KafkaConditions.ConsumerRecordPartitionCondition
static class
KafkaConditions.ConsumerRecordTimestampCondition
static class
KafkaConditions.ConsumerRecordValueCondition<V>
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <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 Detail
-
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.
-
-