Skip to content
Snippets Groups Projects
Commit 60873d33 authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

removed conf from buildpath

refactored test to work with jenkins
moved pipe-factories.conf to src-folder
parent 9e4b0245
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,5 @@ ...@@ -25,6 +25,5 @@
</classpathentry> </classpathentry>
<classpathentry including="**/*.java" kind="src" path="src/main/resources"/> <classpathentry including="**/*.java" kind="src" path="src/main/resources"/>
<classpathentry kind="src" path="src/test/resources"/> <classpathentry kind="src" path="src/test/resources"/>
<classpathentry kind="src" path="conf"/>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>
File moved
...@@ -25,15 +25,15 @@ public class PipeFactoryLoaderTest { ...@@ -25,15 +25,15 @@ public class PipeFactoryLoaderTest {
@Test @Test
public void singleConfig() throws IOException { public void singleConfig() throws IOException {
List<IPipeFactory> list = PipeFactoryLoader.loadPipeFactoriesFromClasspath("pipe-factories.conf"); List<IPipeFactory> list = PipeFactoryLoader.loadPipeFactoriesFromClasspath("pipe-factories.conf");
int lines = Files.readLines(new File("conf/pipe-factories.conf"), Charsets.UTF_8).size(); int lines = Files.readLines(new File("target/classes/pipe-factories.conf"), Charsets.UTF_8).size();
Assert.assertEquals(lines, list.size()); Assert.assertEquals(lines, list.size());
} }
@Test @Test
public void multipleConfigs() throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException { public void multipleConfigs() throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException {
List<URL> files = new ArrayList<URL>(); List<URL> files = new ArrayList<URL>();
File pipeConfig = new File("conf/pipe-factories.conf"); File pipeConfig = new File("target/classes/pipe-factories.conf");
File testConfig = new File("src/test/resources/data/normal-test.conf"); File testConfig = new File("target/test-classes/data/normal-test.conf");
files.add(testConfig.toURI().toURL()); files.add(testConfig.toURI().toURL());
files.add(pipeConfig.toURI().toURL()); files.add(pipeConfig.toURI().toURL());
List<IPipeFactory> pipeFactories = PipeFactoryLoader.mergeFiles(files); List<IPipeFactory> pipeFactories = PipeFactoryLoader.mergeFiles(files);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment