any For Subtype Of
@API(status = API.Status.EXPERIMENTAL, since = "1.8.4" )
Creates Arbitrary with subtypes of a sealed class or interface T. If a subtype is a sealed class or interface, its subtypes are used to create Arbitrary. This is done recursively. TypeArbitrary are created by default under the hood, but this can be customized, for each subtype, with SubtypeScope.provide .
anyForSubtypeOf<MyInterface> {
provide<MyImplementation1> { customArbitrary1() }
provide<MyImplementation2> { customArbitrary2() }
}
Content copied to clipboard
Parameters
enable Arbitrary Recursion
is applied to all created TypeArbitrary.