SubPathConstraint
SubPathConstraint tests that the actual path is under the expected path
namespace NUnit.Framework.Constraints
{
public class SubPathConstraint : PathConstraint
{
public override string Description => "Subpath of " + MsgUtils.FormatValue(expected);
public SubPathConstraint(string expected)
: base(expected)
{
}
protected override bool Matches(string actual)
{
return (actual != null) & IsSubPath(Canonicalize(expected), Canonicalize(actual));
}
}
}