add even more integration tests

This commit is contained in:
Athou
2025-07-21 07:58:59 +02:00
parent c6cc47192c
commit f7ae2e6689
27 changed files with 1772 additions and 107 deletions

View File

@@ -0,0 +1,27 @@
package com.commafeed.tools;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import com.google.common.io.Resources;
class CommaFeedPropertiesGeneratorTest {
@Test
void testGenerate() throws Exception {
InputStream model = getClass().getResourceAsStream("/properties/quarkus-config-model.yaml");
InputStream javadoc = getClass().getResourceAsStream("/properties/quarkus-config-javadoc.yaml");
URL output = getClass().getResource("/properties/output.properties");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
new CommaFeedPropertiesGenerator().generate(model, javadoc, baos);
Assertions.assertLinesMatch(Resources.readLines(output, StandardCharsets.UTF_8).stream(),
baos.toString(StandardCharsets.UTF_8).lines());
}
}