Skip to content

Commit

Permalink
feat(kafka): modules - documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fdelbrayelle committed Jul 11, 2022
1 parent 357da53 commit c70211c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public JHipsterModule buildModule(JHipsterModuleProperties properties) {
.put("zookeeperDockerImage", dockerImages.get("confluentinc/cp-zookeeper").fullName())
.put("kafkaDockerImage", dockerImages.get("confluentinc/cp-kafka").fullName())
.and()
.documentation(documentationTitle("Apache Kafka"), SOURCE.template("apache-kafka.md"))
.javaDependencies()
.dependency(groupId("org.apache.kafka"), artifactId("kafka-clients"))
.dependency(groupId("org.testcontainers"), artifactId("kafka"))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Usage

Before to launch `./mvnw spring-boot:run`, please launch the following command in the root directory: `docker-compose -f src/main/docker/kafka.yml up`.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import static org.mockito.Mockito.when;
import static tech.jhipster.lite.TestFileUtils.tmpDirForTest;
import static tech.jhipster.lite.generator.project.domain.Constants.*;
import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.ModuleFile;
import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.assertThatModuleWithFiles;
import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.pomFile;
import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.*;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
Expand Down Expand Up @@ -48,7 +46,8 @@ void shouldBuildKafkaModule() {
new ModuleFile(
"src/main/resources/generator/server/springboot/core/IntegrationTest.java.mustache",
TEST_JAVA + "/IntegrationTest.java"
)
),
readmeFile()
)
.createFile("pom.xml")
.containing(
Expand Down Expand Up @@ -81,6 +80,10 @@ void shouldBuildKafkaModule() {
.createFile(TEST_JAVA + "/" + TECHNICAL_INFRASTRUCTURE_CONFIG + "/kafka/KafkaPropertiesTest.java")
.and()
.createFile(MAIN_JAVA + "/" + TECHNICAL_INFRASTRUCTURE_CONFIG + "/kafka/KafkaConfiguration.java")
.and()
.createPrefixedFiles("documentation", "apache-kafka.md")
.createFile("README.md")
.containing("[Apache Kafka](documentation/apache-kafka.md)")
.and();
}
}

0 comments on commit c70211c

Please sign in to comment.