Created
July 8, 2011 19:32
-
-
Save cwensel/1072620 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void testComplexLogic() throws Exception | |
| { | |
| if( !new File( inputFileLhs ).exists() ) | |
| fail( "data file not found" ); | |
| copyFromLocal( inputFileLhs ); | |
| Tap source = new Hfs( new TextDelimited( new Fields( "num", "char" ), " " ), inputFileLhs ); | |
| Pipe pipe = new Pipe( "test" ); | |
| Filter filter = new Not( new And( new Fields( "num" ), new RegexFilter( "1", true, true ), new Fields( "char" ), new RegexFilter( "a", true, true ) ) ); | |
| pipe = new Each( pipe, new Fields( "num", "char" ), filter ); | |
| Tap sink = new Hfs( new TextDelimited( Fields.ALL, " " ), outputPath + "/regression/complexlogic", true ); | |
| Flow flow = new FlowConnector( getProperties() ).connect( source, sink, pipe ); | |
| flow.complete(); | |
| validateLength( flow, 1, 2, Pattern.compile( "1\ta" ) ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment