Package org.instancio

Interface LenientModeApi

All Known Subinterfaces:
InstancioApi<T>, InstancioCartesianProductApi<T>, InstancioClassApi<T>, InstancioCollectionsApi<C>

interface LenientModeApi
Provides support for lenient mode.

Instancio supports two modes: strict and lenient, an idea inspired by Mockito's highly useful strict stubbing feature.

In strict mode, unused selectors will trigger an error. In lenient mode, unused selectors are ignored. By default, Instancio runs in strict mode. Strict mode can be disabled by invoking the lenient() method or using the Keys.MODE setting.

Strict mode can catch potential data setup problems, therefore disabling it is not recommended. A better alternative is to mark an individual selector as lenient using the LenientSelector.lenient() method.

Since:
4.0.0
See Also: