Skip to content

Commit bcf7647

Browse files
author
h1alexbel
committed
1 parent addd0ab commit bcf7647

8 files changed

Lines changed: 49 additions & 78 deletions

File tree

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ SOFTWARE.
9494
<junit-api.version>5.9.3</junit-api.version>
9595
<junit-params.version>5.9.3</junit-params.version>
9696
<assert4j-core.version>3.24.2</assert4j-core.version>
97+
<xfake.version>0.0.1</xfake.version>
9798
<xembly.version>0.28.1</xembly.version>
9899
<maven-surefire-plugin.version>3.1.0</maven-surefire-plugin.version>
99100
<maven-verifier-plugin.version>1.1</maven-verifier-plugin.version>
@@ -125,6 +126,11 @@ SOFTWARE.
125126
<artifactId>cactoos</artifactId>
126127
<version>${cactoos.version}</version>
127128
</dependency>
129+
<dependency>
130+
<groupId>io.github.eo-cqrs</groupId>
131+
<artifactId>xfake</artifactId>
132+
<version>${xfake.version}</version>
133+
</dependency>
128134
<dependency>
129135
<groupId>com.jcabi</groupId>
130136
<artifactId>jcabi-xml</artifactId>

src/main/java/io/github/eocqrs/kafka/fake/InXml.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
package io.github.eocqrs.kafka.fake;
2424

2525
import io.github.eocqrs.kafka.Data;
26+
import io.github.eocqrs.xfake.FkStorage;
2627
import org.cactoos.list.ListOf;
2728
import org.xembly.Directives;
2829

src/main/java/io/github/eocqrs/kafka/fake/FkStorage.java renamed to src/main/java/io/github/eocqrs/kafka/fake/storage/FkStorage.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* SOFTWARE.
2121
*/
2222

23-
package io.github.eocqrs.kafka.fake;
23+
package io.github.eocqrs.kafka.fake.storage;
2424

2525
import com.jcabi.xml.XML;
2626
import org.xembly.Directive;
@@ -30,7 +30,9 @@
3030
*
3131
* @author Aliaksei Bialiauski (abialiauski.dev@gmail.com)
3232
* @since 0.2.3
33+
* @deprecated use {@link io.github.eocqrs.xfake.FkStorage}
3334
*/
35+
@Deprecated
3436
public interface FkStorage {
3537

3638
/**

src/main/java/io/github/eocqrs/kafka/fake/ImmutableReentrantLock.java renamed to src/main/java/io/github/eocqrs/kafka/fake/storage/ImmutableReentrantLock.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* SOFTWARE.
2121
*/
2222

23-
package io.github.eocqrs.kafka.fake;
23+
package io.github.eocqrs.kafka.fake.storage;
2424

2525
import java.io.Serial;
2626
import java.util.concurrent.locks.ReentrantLock;
@@ -30,7 +30,9 @@
3030
*
3131
* @author Aliaksei Bialiauski (abialiauski.dev@gmail.com)
3232
* @since 0.2.3
33+
* @deprecated use {@link io.github.eocqrs.xfake.ImmutableReentrantLock}
3334
*/
35+
@Deprecated
3436
final class ImmutableReentrantLock extends ReentrantLock {
3537

3638
/**

src/main/java/io/github/eocqrs/kafka/fake/InFile.java renamed to src/main/java/io/github/eocqrs/kafka/fake/storage/InFile.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* SOFTWARE.
2121
*/
2222

23-
package io.github.eocqrs.kafka.fake;
23+
package io.github.eocqrs.kafka.fake.storage;
2424

2525
import com.jcabi.xml.XML;
2626
import com.jcabi.xml.XMLDocument;
@@ -38,7 +38,9 @@
3838
*
3939
* @author Aliaksei Bialiauski (abialiauski.dev@gmail.com)
4040
* @since 0.2.3
41+
* @deprecated use {@link io.github.eocqrs.xfake.InFile}
4142
*/
43+
@Deprecated(forRemoval = true)
4244
public final class InFile implements FkStorage {
4345

4446
/**
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2023 Aliaksei Bialiauski, EO-CQRS
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in all
12+
* copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
* SOFTWARE.
21+
*/
22+
23+
/**
24+
* @author Aliaksei Bialiauski (abialiauski.dev@gmail.com)
25+
* @since 0.2.4
26+
*/
27+
package io.github.eocqrs.kafka.fake.storage;

src/test/java/io/github/eocqrs/kafka/fake/InFileTest.java

Lines changed: 0 additions & 74 deletions
This file was deleted.

src/test/java/io/github/eocqrs/kafka/fake/InXmlTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
package io.github.eocqrs.kafka.fake;
2424

2525
import io.github.eocqrs.kafka.data.KfData;
26+
import io.github.eocqrs.xfake.FkStorage;
27+
import io.github.eocqrs.xfake.InFile;
2628
import org.hamcrest.MatcherAssert;
2729
import org.hamcrest.Matchers;
2830
import org.junit.jupiter.api.BeforeEach;
@@ -40,11 +42,14 @@
4042
@ExtendWith(MockitoExtension.class)
4143
final class InXmlTest {
4244

45+
/**
46+
* Storage.
47+
*/
4348
private FkStorage storage;
4449

4550
@BeforeEach
4651
void setUp() throws Exception {
47-
this.storage = new InFile();
52+
this.storage = new InFile("fake-kafka", "<broker/>");
4853
}
4954

5055
@Test

0 commit comments

Comments
 (0)