kosi-libs / MocKMP

A mocking processor for Kotlin Multiplatform
https://kosi-libs.org/mockmp
MIT License
183 stars 12 forks source link

Provide/Document way to create custom argument constraints #74

Closed dalewking closed 4 months ago

dalewking commented 4 months ago

I see no documentation on how to create custom constraints and looking at the code it does not appear to actually be possible (e.g. ArgConstraint is not open). The constraints provided are very rudimentary and there are many possibilities missing e.g. greater than, less than, between, combining multiple constraints, constraints on properties of the object.

SalomonBrys commented 4 months ago

Use isValid. It is documented in the section called "defining custom argument constraints" : https://kosi-libs.org/mockmp/1.17/core/mocking.html#_defining_custom_argument_constraints.