From 9bd7cd3eda71c1200fd3a36d66227752f092bc69 Mon Sep 17 00:00:00 2001 From: h1alexbel Date: Tue, 27 Jun 2023 11:36:51 +0300 Subject: [PATCH] #303 dataset dirs seen false --- src/main/java/io/github/eocqrs/kafka/fake/DatasetDirs.java | 5 ++++- .../java/io/github/eocqrs/kafka/fake/DatasetDirsTest.java | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/eocqrs/kafka/fake/DatasetDirs.java b/src/main/java/io/github/eocqrs/kafka/fake/DatasetDirs.java index 2812b136..0f30bb0f 100644 --- a/src/main/java/io/github/eocqrs/kafka/fake/DatasetDirs.java +++ b/src/main/java/io/github/eocqrs/kafka/fake/DatasetDirs.java @@ -74,6 +74,9 @@ public Directives value() throws Exception { .set(this.key) .up() .addIf("value") - .set(this.data.dataized().dataize()); + .set(this.data.dataized().dataize()) + .up() + .addIf("seen") + .set("false"); } } diff --git a/src/test/java/io/github/eocqrs/kafka/fake/DatasetDirsTest.java b/src/test/java/io/github/eocqrs/kafka/fake/DatasetDirsTest.java index 8573b7fd..23d4fca0 100644 --- a/src/test/java/io/github/eocqrs/kafka/fake/DatasetDirsTest.java +++ b/src/test/java/io/github/eocqrs/kafka/fake/DatasetDirsTest.java @@ -17,7 +17,8 @@ final class DatasetDirsTest { void dirsInRightFormat() throws Exception { final String directives = "XPATH \"broker/topics/topic[name = '']\";ADDIF " + "\"datasets\";ADD \"dataset\";ADD \"partition\";\n" - + "4:SET \"0\";UP;ADDIF \"key\";SET \"test\";UP;ADDIF \"value\";SET \"\";"; + + "4:SET \"0\";UP;ADDIF \"key\";SET \"test\";UP;ADDIF \"value\";SET \"\";" + + "UP;ADDIF \"seen\";SET \"false\";"; MatcherAssert.assertThat( "Directives in the right format", new DatasetDirs<>(