Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.17 KB

File metadata and controls

26 lines (18 loc) · 1.17 KB

Extend with another baseline format

You can extend AbstractBaselineAssertion to implement your own format.

Compare JsonBaselineAssertion

(!) This internal API is considered unstable.

Extending from AbstractBaselineAssertion

You can extend from AbstractBaselineAssertion

implement assertion logic

First implement AbstractBaselineAssertion::getAdapter(BaselineContext).

Compare JsonBaselineAssertion for an example.

The adapter is used to decouple operations from the test strategy used. Effectively, atm we just implement the adapter on the assertion itself and don't use more complex context. This is likely to change in the future, when more complex strategies are required.

implement further conventional methods

Usually, you want to implement at least

  • usingYourFormatComparator(...)
  • yourFormatSatisfies(...)