IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Framework.Constraints.PathConstraint Class Reference

PathConstraint serves as the abstract base of constraints that operate on paths and provides several helper methods. More...

+ Inheritance diagram for NUnit.Framework.Constraints.PathConstraint:
+ Collaboration diagram for NUnit.Framework.Constraints.PathConstraint:

Protected Member Functions

 PathConstraint (string expected)
 Construct a PathConstraint for a give expected path More...
 
override string GetStringRepresentation ()
 Returns the string representation of this constraint More...
 
string Canonicalize (string path)
 Canonicalize the provided path More...
 
bool IsSubPath (string path1, string path2)
 Test whether one path in canonical form is a subpath of another path More...
 
- Protected Member Functions inherited from NUnit.Framework.Constraints.StringConstraint
 StringConstraint ()
 Constructs a StringConstraint without an expected value More...
 
 StringConstraint (string expected)
 Constructs a StringConstraint given an expected value More...
 
abstract bool Matches (string actual)
 Test whether the constraint is satisfied by a given string More...
 
- Protected Member Functions inherited from NUnit.Framework.Constraints.Constraint
 Constraint (params object[] args)
 Construct a constraint with optional arguments More...
 

Properties

PathConstraint RespectCase [get]
 Modifies the current instance to be case-sensitive and returns it. More...
 
- Properties inherited from NUnit.Framework.Constraints.StringConstraint
override string Description [get]
 The Description of what this constraint tests, for use in messages and in the ConstraintResult. More...
 
StringConstraint IgnoreCase [get]
 Modify the constraint to ignore case in matching. More...
 
- Properties inherited from NUnit.Framework.Constraints.Constraint
string DisplayName [get, protected set]
 The display name of this Constraint for use by ToString(). The default value is the name of the constraint with trailing "Constraint" removed. Derived classes may set this to another name in their constructors. More...
 
virtual string Description [get, protected set]
 The Description of what this constraint tests, for use in messages and in the ConstraintResult. More...
 
object[] Arguments [get, private set]
 Arguments provided to this Constraint, for use in formatting the description. More...
 
ConstraintBuilder Builder [get, set]
 The ConstraintBuilder holding this constraint More...
 
ConstraintExpression And [get]
 Returns a ConstraintExpression by appending And to the current constraint. More...
 
ConstraintExpression With [get]
 Returns a ConstraintExpression by appending And to the current constraint. More...
 
ConstraintExpression Or [get]
 Returns a ConstraintExpression by appending Or to the current constraint. More...
 
- Properties inherited from NUnit.Framework.Constraints.IConstraint
string DisplayName [get]
 The display name of this Constraint for use by ToString(). More...
 
string Description [get]
 The Description of what this constraint tests, for use in messages and in the ConstraintResult. More...
 
object[] Arguments [get]
 Arguments provided to this Constraint, for use in formatting the description. More...
 
ConstraintBuilder Builder [get, set]
 The ConstraintBuilder holding this constraint More...
 

Private Attributes

const char WindowsDirectorySeparatorChar = '\\'
 
const char NonWindowsDirectorySeparatorChar = '/'
 

Static Private Attributes

static readonly char[] DirectorySeparatorChars = new char[] { WindowsDirectorySeparatorChar, NonWindowsDirectorySeparatorChar }
 

Additional Inherited Members

- Public Member Functions inherited from NUnit.Framework.Constraints.StringConstraint
override ConstraintResult ApplyTo< TActual > (TActual actual)
 Test whether the constraint is satisfied by a given value More...
 
- Public Member Functions inherited from NUnit.Framework.Constraints.Constraint
virtual ConstraintResult ApplyTo< TActual > (ActualValueDelegate< TActual > del)
 Applies the constraint to an ActualValueDelegate that returns the value to be tested. The default implementation simply evaluates the delegate but derived classes may override it to provide for delayed processing. More...
 
virtual ConstraintResult ApplyTo< TActual > (ref TActual actual)
 Test whether the constraint is satisfied by a given reference. The default implementation simply dereferences the value but derived classes may override it to provide for delayed processing. More...
 
override string ToString ()
 Default override of ToString returns the constraint DisplayName followed by any arguments within angle brackets. More...
 
DelayedConstraint After (int delayInMilliseconds)
 Returns a DelayedConstraint with the specified delay time. More...
 
DelayedConstraint After (int delayInMilliseconds, int pollingInterval)
 Returns a DelayedConstraint with the specified delay time and polling interval. More...
 
- Static Public Member Functions inherited from NUnit.Framework.Constraints.Constraint
static Constraint operator& (Constraint left, Constraint right)
 This operator creates a constraint that is satisfied only if both argument constraints are satisfied. More...
 
static Constraint operator| (Constraint left, Constraint right)
 This operator creates a constraint that is satisfied if either of the argument constraints is satisfied. More...
 
static Constraint operator! (Constraint constraint)
 This operator creates a constraint that is satisfied if the argument constraint is not satisfied. More...
 
- Protected Attributes inherited from NUnit.Framework.Constraints.StringConstraint
string expected
 The expected value More...
 
bool caseInsensitive
 Indicates whether tests should be case-insensitive More...
 
string descriptionText
 Description of this constraint More...
 

Detailed Description

PathConstraint serves as the abstract base of constraints that operate on paths and provides several helper methods.

Constructor & Destructor Documentation

NUnit.Framework.Constraints.PathConstraint.PathConstraint ( string  expected)
inlineprotected

Construct a PathConstraint for a give expected path

Parameters
expectedThe expected path

Member Function Documentation

override string NUnit.Framework.Constraints.PathConstraint.GetStringRepresentation ( )
inlineprotectedvirtual

Returns the string representation of this constraint

Reimplemented from NUnit.Framework.Constraints.Constraint.

string NUnit.Framework.Constraints.PathConstraint.Canonicalize ( string  path)
inlineprotected

Canonicalize the provided path

Parameters
path
Returns
The path in standardized form
bool NUnit.Framework.Constraints.PathConstraint.IsSubPath ( string  path1,
string  path2 
)
inlineprotected

Test whether one path in canonical form is a subpath of another path

Parameters
path1The first path - supposed to be the parent path
path2The second path - supposed to be the child path
Returns

References NUnit.Framework.Internal.StringUtil.StringsEqual().

Member Data Documentation

const char NUnit.Framework.Constraints.PathConstraint.WindowsDirectorySeparatorChar = '\\'
private
const char NUnit.Framework.Constraints.PathConstraint.NonWindowsDirectorySeparatorChar = '/'
private
readonly char [] NUnit.Framework.Constraints.PathConstraint.DirectorySeparatorChars = new char[] { WindowsDirectorySeparatorChar, NonWindowsDirectorySeparatorChar }
staticprivate

Property Documentation

PathConstraint NUnit.Framework.Constraints.PathConstraint.RespectCase
get

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