Abbreviated Parameter Constraints

Functions

TypelessConstraint::AP mockpp::any ()
 Creates a constraint that matches any invocation.
TypelessConstraint::AP mockpp::nothing ()
 Creates a constraint that never matches an invocation.
template<typename T >
Constraint< T >::AP mockpp::outBound (const T &op)
 Passes a value back via a reference (outbound value).
template<typename T >
Constraint< T >::AP mockpp::eq (const T &op)
 Creates a constraint that tests for equality.
template<typename T >
Constraint< T >::AP mockpp::ne (const T &op)
 Creates a constraint that tests for non-equality.
template<typename T >
Constraint< T >::AP mockpp::eq (const T &operand, const T &deviation)
 Creates a constraint that tests for near-equality.
template<typename T >
Constraint< T >::AP mockpp::le (const T &value)
 Creates a less-or-equal constraint.
template<typename T >
Constraint< T >::AP mockpp::lt (const T &value)
 Creates a less-than constraint.
template<typename T >
Constraint< T >::AP mockpp::gt (const T &value)
 Creates a greater-than constraint.
template<typename T >
Constraint< T >::AP mockpp::ge (const T &value)
 Creates a greater-or-equal constraint.
template<typename T >
Constraint< T >::AP mockpp::same (const T &operand)
 Creates a constraint that checks if an object is the same.
template<typename ROOT , typename DERIVED >
Constraint< ROOT * >::AP mockpp::isA (const DERIVED &)
 Creates a constraint that checks if an object is derived from a base class.
template<typename ROOT , typename DERIVED >
Constraint< ROOT * >::AP mockpp::isA ()
 Creates a constraint that checks if an object is derived from a base class.
template<typename S >
Constraint< S >::AP mockpp::stringContains (const S &substring)
 Creates a constraint that checks for the occurence of a substring.
template<typename S >
Constraint< S >::AP mockpp::startsWith (const S &substring)
 Creates a constraint that checks for the occurence of a starting substring.
template<typename S >
Constraint< S >::AP mockpp::endsWith (const S &substring)
 Creates a constraint that checks for the occurence of a trailing substring.
template<typename PCS >
Constraint< std::basic_string
< PCS > >::AP 
mockpp::stringContains (const PCS *substring)
 Creates a constraint that checks for the occurence of a substring.
template<typename T >
Constraint< T >::AP mockpp::logic_not (const ConstraintHolder< T > &c)
 Creates a constraint that negates another.
template<typename T >
Constraint< T >::AP mockpp::logic_and (const ConstraintHolder< T > &left, const ConstraintHolder< T > &right, bool shortcut=true)
 Creates a constraint to logically-and two other constraints.
template<typename T >
Constraint< T >::AP mockpp::logic_or (const ConstraintHolder< T > &left, const ConstraintHolder< T > &right, bool shortcut=true)
 Creates a constraint to logically-or two other constraints.

Detailed Description

See also:
mockpp::Constraint Provides convenience functions that create contraint objects. Use of these functions should also help to increase readability if you import them via some appriopriate using directive.

Function Documentation

TypelessConstraint::AP mockpp::any (  ) 

Creates a constraint that matches any invocation.

See also:
mockpp::IsAnything
Returns:
the new constraint
template<typename S >
Constraint<S>::AP mockpp::endsWith ( const S &  substring  )  [inline]

Creates a constraint that checks for the occurence of a trailing substring.

See also:
mockpp::StringEndsWith
Parameters:
substring the substring
Returns:
the new constraint

Definition at line 311 of file ChainingMockObjectSupport.h.

template<typename T >
Constraint<T>::AP mockpp::eq ( const T &  operand,
const T &  deviation 
) [inline]

Creates a constraint that tests for near-equality.

See also:
mockpp::IsCloseTo
Parameters:
operand object to compare with
deviation amount of allowed deviation
Returns:
the new constraint

Definition at line 164 of file ChainingMockObjectSupport.h.

template<typename T >
Constraint<T>::AP mockpp::eq ( const T &  op  )  [inline]

Creates a constraint that tests for equality.

See also:
mockpp::IsEqual
Parameters:
op object to compare with
Returns:
the new constraint

Definition at line 135 of file ChainingMockObjectSupport.h.

template<typename T >
Constraint<T>::AP mockpp::ge ( const T &  value  )  [inline]

Creates a greater-or-equal constraint.

See also:
mockpp::IsGreaterOrEqual
Parameters:
value object to compare with
Returns:
the new constraint

Definition at line 220 of file ChainingMockObjectSupport.h.

template<typename T >
Constraint<T>::AP mockpp::gt ( const T &  value  )  [inline]

Creates a greater-than constraint.

See also:
mockpp::IsGreaterThan
Parameters:
value object to compare with
Returns:
the new constraint

Definition at line 206 of file ChainingMockObjectSupport.h.

template<typename ROOT , typename DERIVED >
Constraint<ROOT*>::AP mockpp::isA (  )  [inline]

Creates a constraint that checks if an object is derived from a base class.

The base class is needed since dynamic_cast checks for an existing traversal from derived to base.

See also:
mockpp::IsInstanceOf
Returns:
the new constraint

Definition at line 267 of file ChainingMockObjectSupport.h.

template<typename ROOT , typename DERIVED >
Constraint<ROOT*>::AP mockpp::isA ( const DERIVED &   )  [inline]

Creates a constraint that checks if an object is derived from a base class.

The base class is needed since dynamic_cast checks for an existing traversal from derived to base.

See also:
mockpp::IsInstanceOf
Returns:
the new constraint

Definition at line 252 of file ChainingMockObjectSupport.h.

template<typename T >
Constraint<T>::AP mockpp::le ( const T &  value  )  [inline]

Creates a less-or-equal constraint.

See also:
mockpp::IsLessOrEqual
Parameters:
value object to compare with
Returns:
the new constraint

Definition at line 178 of file ChainingMockObjectSupport.h.

template<typename T >
Constraint<T>::AP mockpp::logic_and ( const ConstraintHolder< T > &  left,
const ConstraintHolder< T > &  right,
bool  shortcut = true 
) [inline]

Creates a constraint to logically-and two other constraints.

See also:
mockpp::And
Parameters:
left the first constraint
right the second constraint
shortcut 
  • true: don't evaluate right if left is true (c++ standard behaviour)
  • false: alwyas evaluate right even if left is true
Returns:
the new constraint

Definition at line 356 of file ChainingMockObjectSupport.h.

template<typename T >
Constraint<T>::AP mockpp::logic_not ( const ConstraintHolder< T > &  c  )  [inline]

Creates a constraint that negates another.

See also:
mockpp::IsNot
Parameters:
c the other constraint
Returns:
the new constraint

Definition at line 339 of file ChainingMockObjectSupport.h.

template<typename T >
Constraint<T>::AP mockpp::logic_or ( const ConstraintHolder< T > &  left,
const ConstraintHolder< T > &  right,
bool  shortcut = true 
) [inline]

Creates a constraint to logically-or two other constraints.

See also:
mockpp::Or
Parameters:
left the first constraint
right the second constraint
shortcut 
  • true: don't evaluate right if left is true (c++ standard behaviour)
  • false: alwyas evaluate right even if left is true
Returns:
the new constraint

Definition at line 375 of file ChainingMockObjectSupport.h.

template<typename T >
Constraint<T>::AP mockpp::lt ( const T &  value  )  [inline]

Creates a less-than constraint.

See also:
mockpp::IsLessThan
Parameters:
value object to compare with
Returns:
the new constraint

Definition at line 192 of file ChainingMockObjectSupport.h.

template<typename T >
Constraint<T>::AP mockpp::ne ( const T &  op  )  [inline]

Creates a constraint that tests for non-equality.

See also:
mockpp::IsNot
Parameters:
op object to compare with
Returns:
the new constraint

Definition at line 149 of file ChainingMockObjectSupport.h.

TypelessConstraint::AP mockpp::nothing (  ) 

Creates a constraint that never matches an invocation.

See also:
mockpp::IsNothing
Returns:
the new constraint
template<typename T >
Constraint<T>::AP mockpp::outBound ( const T &  op  )  [inline]

Passes a value back via a reference (outbound value).

See also:
mockpp::OutBound
Parameters:
op object to return at invoationwith
Returns:
the new constraint

Definition at line 121 of file ChainingMockObjectSupport.h.

template<typename T >
Constraint<T>::AP mockpp::same ( const T &  operand  )  [inline]

Creates a constraint that checks if an object is the same.

See also:
mockpp::IsSame
Parameters:
operand object to compare with
Returns:
the new constraint

Definition at line 234 of file ChainingMockObjectSupport.h.

template<typename S >
Constraint<S>::AP mockpp::startsWith ( const S &  substring  )  [inline]

Creates a constraint that checks for the occurence of a starting substring.

See also:
mockpp::StringStartsWith
Parameters:
substring the substring
Returns:
the new constraint

Definition at line 297 of file ChainingMockObjectSupport.h.

template<typename PCS >
Constraint< std ::basic_string<PCS> >::AP mockpp::stringContains ( const PCS *  substring  )  [inline]

Creates a constraint that checks for the occurence of a substring.

See also:
mockpp::StringContains
Parameters:
substring the substring
Returns:
the new constraint

Definition at line 325 of file ChainingMockObjectSupport.h.

template<typename S >
Constraint<S>::AP mockpp::stringContains ( const S &  substring  )  [inline]

Creates a constraint that checks for the occurence of a substring.

See also:
mockpp::StringContains
Parameters:
substring the substring
Returns:
the new constraint

Definition at line 283 of file ChainingMockObjectSupport.h.

 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on Tue Jan 5 09:48:57 2010 for mockpp by  doxygen 1.6.1