TestCenter Reference
TestSupport.BDD._BDDContext Class Reference
Inheritance diagram for TestSupport.BDD._BDDContext:

Public Member Functions

def __init__ (self)
 
def And (self)
 
def With (self)
 
def When (self)
 
def Then (self)
 
def __getattr__ (self, name)
 

Detailed Description

Context of a BDD test case.

Instances of this class are created with Given(). All functions defined
with the clause decorators are added to _BDDContext.

Definition at line 124 of file BDD.py.

Constructor & Destructor Documentation

◆ __init__()

def TestSupport.BDD._BDDContext.__init__ (   self)

Definition at line 131 of file BDD.py.

References TestSupport.BDD._BDDContext._state.

Member Function Documentation

◆ __getattr__()

def TestSupport.BDD._BDDContext.__getattr__ (   self,
  name 
)
Returns Given/When/Then method corresponding to @a name.

Definition at line 170 of file BDD.py.

References TestSupport.BDD._BDDContext._state.

◆ And()

def TestSupport.BDD._BDDContext.And (   self)
Conjunction for joining two clauses of the same type.

This method does nothing except returning the context. It is merely
syntactic sugar for joining two clauses of the same type, i.e. two
Given clauses, two When clauses, or two Then clauses.

Definition at line 134 of file BDD.py.

◆ Then()

def TestSupport.BDD._BDDContext.Then (   self)
Conjunction for marking the start of the Then part.

This method starts the Then part of the sentence describing the
desired behavior. It returns the context.

Definition at line 161 of file BDD.py.

References TestSupport.BDD._BDDContext._state.

◆ When()

def TestSupport.BDD._BDDContext.When (   self)
Conjunction for marking the start of the When part.

This method starts the When part of the sentence describing the
desired behavior. It returns the context.

Definition at line 152 of file BDD.py.

References TestSupport.BDD._BDDContext._state.

◆ With()

def TestSupport.BDD._BDDContext.With (   self)
Conjunction for joining two clauses of the same type.

This method does nothing except returning the context. It is merely
syntactic sugar for joining two clauses of the same type, i.e. two
Given clauses, two When clauses, or two Then clauses.

Definition at line 143 of file BDD.py.


The documentation for this class was generated from the following file: