ExopData v0.1.7 ExopData View Source
ExopData utilize the power of two libs: Exop & StreamData to help you write property-based tests. ExopData generates properties (essentially generates StreamData generators) based on Exop operation's contract.
A contract is a list of maps %{name: atom(), opts: keyword()}
, where each map represents
a single parameter (%{name: :param_a, opts: [type: :string, length: %{min: 1}]}
)
For more information on Exop, operations, contracts and checks see https://github.com/madeinussr/exop
Link to this section Summary
Functions
Returns a StreamData generator for either an Exop operation or a contract.
Returns a StreamData generator for parameter's opts and props opts given to ExopData generator.
Link to this section Types
contract()
View Source
contract() :: [contract_item()]
contract() :: [contract_item()]
contract_item() View Source
Link to this section Functions
check_operation(operation, expected_result_func) View Source (macro)
check_operation(operation, opts, expected_result_func) View Source (macro)
generate(operation_or_contract, props_opts \\ [])
View Source
generate(module() | ExopData.contract(), keyword()) :: StreamData.t()
generate(module() | ExopData.contract(), keyword()) :: StreamData.t()
Returns a StreamData generator for either an Exop operation or a contract.
generator_for_opts(opts, opts)
View Source
generator_for_opts(map(), map()) :: StreamData.t()
generator_for_opts(map(), map()) :: StreamData.t()
Returns a StreamData generator for parameter's opts and props opts given to ExopData generator.