JUnit5 comparison components
- ../assert Comparing models against systems
This module integrates the capabilities of assert-core
into the junit5 testing framework.
It provides the Flocessor
class, which should be used as a generator for a dynamic test
After importing the bom
:
<dependency>
<!-- system assertion -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>assert-junit5</artifactId>
<scope>test</scope>
</dependency>
The flocessor should be used to provide the output of a TestFactory method:
@TestFactory
Stream<DynamicNode> myTest() {
return new Flocessor( "my test name", mySystemModel )
.system( /* The actors that are being exercised */ )
.behaviour( asrt -> {
// implement this to push data from asrt into your system
// and then put the system outputs back into asrt
} ).tests();
}