C# Class NUnit.Framework.Constraints.PathConstraint

PathConstraint serves as the abstract base of constraints that operate on paths and provides several helper methods.
Inheritance: NUnit.Framework.Constraints.Constraint
Show file Open project: antonsamarsky/emitmapper-tools

Protected Properties

Property Type Description
caseInsensitive bool
expected string

Public Methods

Method Description
ToString ( ) : string

Returns the string representation of this constraint

Protected Methods

Method Description
Canonicalize ( string path ) : string

Canonicalize the provided path

IsSamePath ( string path1, string path2 ) : bool

Test whether two paths are the same

IsSamePathOrUnder ( string path1, string path2 ) : bool

Test whether one path is the same as or under another path

PathConstraint ( string expected ) : System

Construct a PathConstraint for a give expected path

Method Details

Canonicalize() protected method

Canonicalize the provided path
protected Canonicalize ( string path ) : string
path string
return string

IsSamePath() protected method

Test whether two paths are the same
protected IsSamePath ( string path1, string path2 ) : bool
path1 string The first path
path2 string The second path
return bool

IsSamePathOrUnder() protected method

Test whether one path is the same as or under another path
protected IsSamePathOrUnder ( string path1, string path2 ) : bool
path1 string The first path - supposed to be the parent path
path2 string The second path - supposed to be the child path
return bool

PathConstraint() protected method

Construct a PathConstraint for a give expected path
protected PathConstraint ( string expected ) : System
expected string The expected path
return System

ToString() public method

Returns the string representation of this constraint
public ToString ( ) : string
return string

Property Details

caseInsensitive protected property

Flag indicating whether a caseInsensitive comparison should be made
protected bool caseInsensitive
return bool

expected protected property

The expected path used in the constraint
protected string expected
return string