Fluent Method

Behavior DefinED

The PED advocacy of the Fluent Method idiom brings programming flexibility to a code base. That is, both production source and JUnit test code can employ the same semantic to drive enhanced readability.

Note: The JUnit rule chain and the AssertJ assertThat() methods incorporate the Fluent Rule and Fluent Assert approach (respectively) into their testing frameworks.

SOURCE EXAMPLE

Here is a fluent example of the JUnit rule chain Separated Interface:

AssertionsExistDemonstration

Here is a test class that verifies JPA cascades using a fluent Parameter Object:

AssertionsCascadeDemonstration

Source Search