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

PathConstraint

public abstract class PathConstraint : StringConstraint
PathConstraint serves as the abstract base of constraints that operate on paths and provides several helper methods.
public PathConstraint RespectCase { get; }

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

protected PathConstraint(string expected)

Construct a PathConstraint for a give expected path

protected string Canonicalize(string path)

Canonicalize the provided path

Determines the StringComparison value based on the caseInsensitive field. If caseInsensitive is true, it returns OrdinalIgnoreCase; otherwise, it returns Ordinal.

protected bool IsSubPath(string path1, string path2)

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