Liking cljdoc? Tell your friends :D

clara.tools.testing-utils

clj

Internal utilities for testing clara-rules and derivative projects. These should be considered experimental right now from the perspective of consumers of clara-rules, although it is possible that this namespace will be made part of the public API once its functionality has proven robust and reliable. The focus, however, is functionality needed to test the rules engine itself.

Internal utilities for testing clara-rules and derivative projects.  These should be considered experimental
right now from the perspective of consumers of clara-rules, although it is possible that this namespace 
will be made part of the public API once its functionality has proven robust and reliable.  The focus, however,
is functionality needed to test the rules engine itself.
raw docstring

def-rules-testclj/smacro

(def-rules-test name params & forms)

This macro allows creation of rules, queries, and sessions from arbitrary combinations of rules and queries in a setup map without the necessity of creating a namespace or defining a session using defsession in both Clojure and ClojureScript. The first argument is the name of the test, and the second argument is a map with entries :rules, :queries, and :sessions. For example usage see clara.test-testing-utils. Note that sessions currently can only contain rules and queries defined in the setup map; supporting other rule sources such as namespaces and defrule/defquery may be possible in the future.

Namespaces consuming this macro are expected to require clara.rules and either clojure.test or cljs.test. Unfortunately, at this time we can't add inline requires for these namespace with the macroexpanded code in ClojureScript; see https://anmonteiro.com/2016/10/clojurescript-require-outside-ns/ for some discussion on the subject. However, the test namespaces consuming this will in all likelihood have these dependencies anyway so this probably isn't a significant shortcoming of this macro.

This macro allows creation of rules, queries, and sessions from arbitrary combinations of rules
and queries in a setup map without the necessity of creating a namespace or defining a session
using defsession in both Clojure and ClojureScript.  The first argument is the name of the test, 
and the second argument is a map with entries :rules, :queries, and :sessions.  For example usage see
clara.test-testing-utils.  Note that sessions currently can only contain rules and queries defined
in the setup map; supporting other rule sources such as namespaces and defrule/defquery may be possible
in the future.

Namespaces consuming this macro are expected to require clara.rules and either clojure.test or cljs.test.
Unfortunately, at this time we can't add inline requires for these namespace with the macroexpanded code in
ClojureScript; see https://anmonteiro.com/2016/10/clojurescript-require-outside-ns/ for some discussion on the 
subject.  However, the test namespaces consuming this will in all likelihood have these dependencies anyway
so this probably isn't a significant shortcoming of this macro.
sourceraw docstring

join-filter-equalsclj/s

(join-filter-equals & args)

Intended to be a test function that is the same as equals, but is not visible to Clara as such and thus forces usage of join filters instead of hash joins

Intended to be a test function that is the same as equals, but is not visible to Clara as such
and thus forces usage of join filters instead of hash joins
sourceraw docstring

opts-fixtureclj

(opts-fixture f)
source

side-effect-holderclj/s

source

side-effect-holder-fixtureclj/s

(side-effect-holder-fixture t)

Fixture to reset the side effect holder to nil both before and after tests. This should be used as a :each fixture.

Fixture to reset the side effect holder to nil both before and after tests.
This should be used as a :each fixture.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close