mirror of
https://github.com/Athou/commafeed.git
synced 2026-10-18 10:13:40 +00:00
use google java formatter to avoid downloading eclipse during build
This commit is contained in:
@@ -1,27 +1,26 @@
|
||||
package com.commafeed.tools;
|
||||
|
||||
import com.google.common.io.Resources;
|
||||
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);
|
||||
@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());
|
||||
}
|
||||
|
||||
}
|
||||
Assertions.assertLinesMatch(
|
||||
Resources.readLines(output, StandardCharsets.UTF_8).stream(),
|
||||
baos.toString(StandardCharsets.UTF_8).lines());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user