PAssert
PAssert
is a class included in the Beam Java SDK that is an
assertion on the contents of a PCollection
. You can use PAssert
to verify
that a PCollection
contains a specific set of expected elements.
Examples
For a given PCollection
, you can use PAssert
to verify the contents as follows:
Any code that uses PAssert
must link in JUnit
and Hamcrest
.
If you’re using Maven, you can link in Hamcrest
by adding the
following dependency to your project’s pom.xml file:
Related transforms
- TestStream
Last updated on 2024/11/20
Have you found everything you were looking for?
Was it all useful and clear? Is there anything that you would like to change? Let us know!