Interface PAssert.SingletonAssert<T>
- Enclosing class:
PAssert
-
Method Summary
Modifier and TypeMethodDescriptioninEarlyPane(BoundedWindow window) Creates a newPAssert.SingletonAssertlike this one, but with the assertion restricted to only run on the provided window, running the checker only on early panes for each key.inFinalPane(BoundedWindow window) Creates a newPAssert.SingletonAssertlike this one, but with the assertion restricted to only run on the provided window, running the checker only on the final pane for each key.inLatePane(BoundedWindow window) Creates a newPAssert.SingletonAssertwith the assertion restricted to only run on the provided window, running the checker only on late panes for each key.inOnlyPane(BoundedWindow window) Creates a newPAssert.SingletonAssertlike this one, but with the assertion restricted to only run on the provided window.inOnTimePane(BoundedWindow window) Creates a newPAssert.SingletonAssertlike this one, but with the assertion restricted to only run on the provided window, running the checker only on the on-time pane for each key.inWindow(BoundedWindow window) Creates a newPAssert.SingletonAssertlike this one, but with the assertion restricted to only run on the provided window.Asserts that the value in question is equal to the provided value, according toObject.equals(java.lang.Object).notEqualTo(T notExpected) Asserts that the value in question is not equal to the provided value, according toObject.equals(java.lang.Object).satisfies(SerializableFunction<T, Void> checkerFn) Applies the provided checking function (presumably containing assertions) to the value in question.
-
Method Details
-
inWindow
Creates a newPAssert.SingletonAssertlike this one, but with the assertion restricted to only run on the provided window.The assertion will concatenate all panes present in the provided window if the
Triggerproduces multiple panes. If the windowing strategy accumulates fired panes and triggers fire multiple times, consider using insteadinFinalPane(BoundedWindow)orinOnTimePane(BoundedWindow).- Returns:
- a new
PAssert.SingletonAssertlike this one but with the assertion only applied to the specified window.
-
inOnlyPane
Creates a newPAssert.SingletonAssertlike this one, but with the assertion restricted to only run on the provided window.The assertion will expect outputs to be produced to the provided window exactly once. If the upstream
Triggermay produce output multiple times, consider instead usinginFinalPane(BoundedWindow)orinOnTimePane(BoundedWindow).- Returns:
- a new
PAssert.SingletonAssertlike this one but with the assertion only applied to the specified window.
-
inFinalPane
Creates a newPAssert.SingletonAssertlike this one, but with the assertion restricted to only run on the provided window, running the checker only on the final pane for each key.If the input
WindowingStrategydoes not always produce final panes, the assertion may be executed over an empty input even if the trigger has fired previously. To ensure that a final pane is always produced, set theWindow.ClosingBehaviorof the windowing strategy (viaWindow.withAllowedLateness(Duration, ClosingBehavior)settingWindow.ClosingBehaviortoWindow.ClosingBehavior.FIRE_ALWAYS).- Returns:
- a new
PAssert.SingletonAssertlike this one but with the assertion only applied to the specified window.
-
inOnTimePane
Creates a newPAssert.SingletonAssertlike this one, but with the assertion restricted to only run on the provided window, running the checker only on the on-time pane for each key.- Returns:
- a new
PAssert.SingletonAssertlike this one but with the assertion only applied to the specified window.
-
inEarlyPane
Creates a newPAssert.SingletonAssertlike this one, but with the assertion restricted to only run on the provided window, running the checker only on early panes for each key.- Returns:
- a new
PAssert.SingletonAssertlike this one but with the assertion only applied to the specified window.
-
inLatePane
Creates a newPAssert.SingletonAssertwith the assertion restricted to only run on the provided window, running the checker only on late panes for each key.- Returns:
- a new
PAssert.SingletonAssertlike this one but with the assertion only applied to the specified window.
-
isEqualTo
Asserts that the value in question is equal to the provided value, according toObject.equals(java.lang.Object).- Returns:
- the same
PAssert.SingletonAssertbuilder for further assertions
-
notEqualTo
Asserts that the value in question is not equal to the provided value, according toObject.equals(java.lang.Object).- Returns:
- the same
PAssert.SingletonAssertbuilder for further assertions
-
satisfies
Applies the provided checking function (presumably containing assertions) to the value in question.- Returns:
- the same
PAssert.SingletonAssertbuilder for further assertions
-