This page describes how to set up PipeT unit tests in a Maven environment.
Add the pipet-test package to your POM as a dependency with scope test:
<dependencies>
<dependency>
<groupId>net.sf.pipet</groupId>
<artifactId>pipet-test</artifactId>
<version>1.2.15</version>
<scope>test</scope>
</dependency>
...
</dependencies>Create test cases as described in the javadoc documentation. Copy your test case declarations to src/test/resources, and use the extension *.pipet.testcase to name the files, e.g.: mytestcase.pipet.testcase.
Create a junit test class as usual; it can be as simple as this:
package org.example;
import net.sf.pipet.test.PipelineTest;
public class ExampleUnitTest {
@org.junit.Test
public void testPipelines() throws Exception {
PipelineTest.scanDirectory();
}
}See the Maven Test Plugin manual and the JUnit manual for help on writing and performing unit tests in general.