Skip to content

Commit

Permalink
cov up
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Jun 27, 2023
1 parent 2a01223 commit 1b31065
Showing 1 changed file with 50 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package io.github.eocqrs.kafka.parameters;

import io.github.eocqrs.kafka.Params;
import org.apache.kafka.clients.consumer.KafkaConsumer;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.cactoos.map.MapOf;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;

/**
* Test case for {@link KfFlexibleEnvelope}.
*
* @author Aliaksei Bialiauski (abialiauski.dev@gmail.com)
* @since 0.3.5
*/
final class KfFlexibleEnvelopeTest {

@Test
void createsWithEnvelope() {
final KfFlexibleEnvelope<String, String> envelope =
new KfFlexibleEnvelopeTest.Example(
new KfParams(
new ClientId("test")
)
);
MatcherAssert.assertThat(
"Creates with Envelope",
envelope,
Matchers.notNullValue()
);
}

private static class Example extends KfFlexibleEnvelope<String, String> {

protected Example(final Params params) {
super(params);
}

@Override
public KafkaConsumer<String, String> consumer() {
return new KafkaConsumer<>(new MapOf<>());
}

@Override
public KafkaProducer<String, String> producer() {
return new KafkaProducer<>(new MapOf<>());
}
}
}

0 comments on commit 1b31065

Please sign in to comment.