| Products | Versions |
|---|---|
| TIBCO Streaming | 7 |
There doesn't appear to be an expecter for my test, which is to check a tuple with a field which is a list of tuples and check for the specific size of the list, regardless of contents.
// Collect output tuples for the test
List<Tuple> output = outputStream.dequeue(1);
// Check for no tuples returned
if (output.isEmpty()){ throw new junit.framework.AssertionFailedError("Expected at least one tuple."); }
// Inspect the tuple and throw a JUnit error if the test fails
if (!output.get(0).getList("TupleList").size()==expectedTupleCount) {
String error = String.format("Expected %s tuples in TupleList field.",expectedTupleCount);
throw new junit.framework.AssertionFailedError(error);
}