<PackageReference Include="NUnit" Version="2.7.0" />

PathConstraint

public abstract class PathConstraint : Constraint
PathConstraint serves as the abstract base of constraints that operate on paths and provides several helper methods.
protected bool caseInsensitive

Flag indicating whether a caseInsensitive comparison should be made

protected string expectedPath

The expected path used in the constraint

public PathConstraint IgnoreCase { get; }

Modifies the current instance to be case-insensitve and returns it.

public PathConstraint RespectCase { get; }

Modifies the current instance to be case-sensitve and returns it.

protected PathConstraint(string expectedPath)

Construct a PathConstraint for a give expected path

protected static string Canonicalize(string path)

Transform the provided path to its canonical form so that it may be more easily be compared with other paths.

protected static bool IsSubPath(string path1, string path2, bool ignoreCase)

Test whether one path in canonical form is under another.

protected abstract bool IsMatch(string expectedPath, string actualPath)

Returns true if the expected path and actual path match