spark.spec-tacular.generators

Provides generators to be used in conjunction with clojure.test.check.generators

check-create!

added in 0.6.0

(check-create! conn-ctx original)

Checks that original can be created on the database.

check-update!

added in 0.6.0

(check-update! conn-ctx original updates)

Checks that original can be updated with updates, and the result should be a shallow merge of original into updates.

Generate as suitable update map with update-generator.

instance-generator

multimethod

Returns a generator for the given spec. Optional second argument can be used to override generators for the items in the spec, and should be a map from field names to generators.

prop-creation-update

added in 0.6.0

(prop-creation-update conn-ctx-thunk spec-key)

Defines a property that tests whether instances of a given spec name can be created, updated, and sent to and from the database.

update-generator

(update-generator spec)

Returns a spec instance “subset” (intended to be smaller than generating an instance of spec with instance-generator) suitable to use as an argument to assoc!.