diff --git a/conf/pipe-factories.conf b/conf/pipe-factories.conf index 50f869a06cb126ddb81847cfd8cc4681f1a63195..e3d966cf8d0cab50e88237071d46309bd49b1347 100644 --- a/conf/pipe-factories.conf +++ b/conf/pipe-factories.conf @@ -1,4 +1,4 @@ teetime.framework.pipe.SingleElementPipeFactory teetime.framework.pipe.OrderedGrowableArrayPipeFactory teetime.framework.pipe.UnorderedGrowablePipeFactory -teetime.framework.pipe.SpScPipeFactory +teetime.framework.pipe.SpScPipeFactory \ No newline at end of file diff --git a/src/test/java/teetime/framework/FileSearcherTest.java b/src/test/java/teetime/framework/FileSearcherTest.java index 74c4b073bc0cadc6cbcd662266282165d6e80662..44729d093341928120fa4c5e382d509e04c53e67 100644 --- a/src/test/java/teetime/framework/FileSearcherTest.java +++ b/src/test/java/teetime/framework/FileSearcherTest.java @@ -10,11 +10,14 @@ import java.util.List; import org.junit.Assert; import org.junit.Test; +import teetime.framework.pipe.IPipeFactory; +import teetime.framework.pipe.PipeFactoryLoader; + public class FileSearcherTest { @Test public void fileInClasspath() throws IOException { - List<URL> list = FileSearcher.loadResources("data/input.txt"); + List<URL> list = FileSearcher.loadResources("pipe-factories.conf"); Assert.assertEquals(false, list.isEmpty()); } @@ -32,7 +35,15 @@ public class FileSearcherTest { @Test public void emptyConfig() throws IOException { - // List<IPipeFactory> list = PipeFactoryLoader.mergeConfigFiles(); + List<IPipeFactory> list = PipeFactoryLoader.mergeConfigFiles("data/empty-test.conf"); + Assert.assertEquals(true, list.isEmpty()); + } + + @Test + public void singleConfig() throws IOException { + List<IPipeFactory> list = PipeFactoryLoader.mergeConfigFiles("pipe-factories.conf"); + int lines = this.countLines(new File("conf/pipe-factories.conf")); + Assert.assertEquals(lines, list.size()); } private int countLines(final File fileName) throws IOException { diff --git a/src/test/resources/data/empty-test.conf b/src/test/resources/data/empty-test.conf new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391