TestCenter Reference
|
Classes | |
class | _BDDContext |
Functions | |
def | Given () |
def | GivenClause (func) |
def | WhenClause (func) |
def | ThenClause (func) |
def TestSupport.BDD.Given | ( | ) |
def TestSupport.BDD.GivenClause | ( | func | ) |
Decorator for defining a Given clause. The first argument that is passed to the decorated function is the context object. Custom parameters are passed to the decorated function after the context object. The decorated function always returns the context object. Example: @GivenClause def a_precondition(testContext): # perform the setup of the test, e.g. by parameterizing a TestPattern # module
def TestSupport.BDD.ThenClause | ( | func | ) |
Decorator for defining a Then clause. The first argument that is passed to the decorated function is the context of the test case. Custom parameters are passed to the decorated function after the context. The decorated function always returns the context object. Example: @ThenClause def something_happens(testContext): # check for the expected behavior, e.g. by comparing a field value # with an expected value
def TestSupport.BDD.WhenClause | ( | func | ) |
Decorator for defining a When clause. The first argument that is passed to the decorated function is the context of the test case. Custom parameters are passed to the decorated function after the context. The decorated function always returns the context object. Example: @WhenClause def you_do_something(testContext): # do whatever shall result in a certain behavior, e.g. touch a field