aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorpacien2018-01-07 23:03:21 +0100
committerpacien2018-01-07 23:20:23 +0100
commitd6be0ea1898777f358a5c0d772d3eadb97d83127 (patch)
treea915af972bdd77b5ef8057c1ce86c0ec994af2b3 /src/test/java
downloadpandoc-filter-plantuml-d6be0ea1898777f358a5c0d772d3eadb97d83127.tar.gz
Import project
Signed-off-by: pacien <pacien.trangirard@pacien.net>
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/pacien/pandoc/filter/plantuml/FilterTest.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/java/org/pacien/pandoc/filter/plantuml/FilterTest.java b/src/test/java/org/pacien/pandoc/filter/plantuml/FilterTest.java
new file mode 100644
index 0000000..f720b22
--- /dev/null
+++ b/src/test/java/org/pacien/pandoc/filter/plantuml/FilterTest.java
@@ -0,0 +1,27 @@
1package org.pacien.pandoc.filter.plantuml;
2
3import org.junit.Assert;
4import org.junit.Test;
5
6import java.io.*;
7import java.net.URISyntaxException;
8import java.nio.file.Files;
9import java.nio.file.Paths;
10
11final public class FilterTest {
12
13 private static final String INPUT_FILE = "/input.json";
14 private static final String EXPECTED_FILE = "/expected.json";
15
16 @Test
17 public void filterTest() {
18 try (ByteArrayOutputStream o = new ByteArrayOutputStream()) {
19 byte[] e = Files.readAllBytes(Paths.get(getClass().getResource(EXPECTED_FILE).toURI()));
20 Filter.filter(getClass().getResourceAsStream(INPUT_FILE), o);
21 Assert.assertArrayEquals(o.toByteArray(), e);
22 } catch (IOException | URISyntaxException e) {
23 Assert.fail();
24 }
25 }
26
27}