Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
zobierlabs
nifi-examples
Commits
48258ba4
Commit
48258ba4
authored
Feb 05, 2016
by
Phillip Grenier
Browse files
Remove un-used imports
parent
34bcb3d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test/java/rocks/nifi/examples/processors/JsonProcessorTest.java
View file @
48258ba4
...
...
@@ -9,15 +9,10 @@ import java.io.ByteArrayInputStream;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.Set
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.nifi.processor.ProcessContext
;
import
org.apache.nifi.processor.ProcessSession
;
import
org.apache.nifi.processor.ProcessorInitializationContext
;
import
org.apache.nifi.util.MockFlowFile
;
import
org.apache.nifi.util.TestRunner
;
import
org.apache.nifi.util.TestRunners
;
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.*;
/**
...
...
@@ -37,7 +32,7 @@ public class JsonProcessorTest {
// Generate a test runner to mock a processor in a flow
TestRunner
runner
=
TestRunners
.
newTestRunner
(
new
JsonProcessor
());
// Add proper
i
tes
// Add propert
i
es
runner
.
setProperty
(
JsonProcessor
.
JSON_PATH
,
"$.hello"
);
// Add the content to the runner
...
...
@@ -49,7 +44,7 @@ public class JsonProcessorTest {
// All results were processed with out failure
runner
.
assertQueueEmpty
();
// If you need to read or do aditional tests on results you can access the content
// If you need to read or do ad
d
itional tests on results you can access the content
List
<
MockFlowFile
>
results
=
runner
.
getFlowFilesForRelationship
(
JsonProcessor
.
SUCCESS
);
assertTrue
(
"1 match"
,
results
.
size
()
==
1
);
MockFlowFile
result
=
results
.
get
(
0
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment