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

Link to this type

contract_item() View Source
contract_item() :: %{name: atom(), opts: keyword()}

Link to this section Functions

Link to this macro

check_operation(operation, expected_result_func) View Source (macro)

Link to this macro

check_operation(operation, opts, expected_result_func) View Source (macro)

Link to this function

generate(operation_or_contract, props_opts \\ []) View Source
generate(module() | ExopData.contract(), keyword()) :: StreamData.t()

Returns a StreamData generator for either an Exop operation or a contract.

Link to this function

generator_for_opts(opts, opts) View Source
generator_for_opts(map(), map()) :: StreamData.t()

Returns a StreamData generator for parameter's opts and props opts given to ExopData generator.

Link to this macro

sigil_g(arg, modifiers) View Source (macro)