Table of Contents

Class SubPathConstraint

Namespace
NUnit.Framework.Constraints
Assembly
nunit.framework.dll

SubPathConstraint tests that the actual path is under the expected path

public class SubPathConstraint : PathConstraint, IConstraint, IResolveConstraint
Inheritance
SubPathConstraint
Implements
Inherited Members

Constructors

SubPathConstraint(string)

Initializes a new instance of the SubPathConstraint class.

public SubPathConstraint(string expected)

Parameters

expected string

The expected path

Properties

Description

The Description of what this constraint tests, for use in messages and in the ConstraintResult.

public override string Description { get; }

Property Value

string

Methods

Matches(string)

Test whether the constraint is satisfied by a given value

protected override bool Matches(string actual)

Parameters

actual string

The value to be tested

Returns

bool

True for success, false for failure