C# Class NUnit.Framework.Constraints.SubDirectoryConstraint

SubDirectoryConstraint is used to test that one directory is a subdirectory of another.
Inheritance: NUnit.Framework.Constraints.Constraint
Datei anzeigen Open project: antonsamarsky/emitmapper-tools

Public Methods

Method Description
Matches ( object actual ) : bool

Test whether the constraint is satisfied by a given value

SubDirectoryConstraint ( DirectoryInfo dirInfo ) : System

Initializes a new instance of the T:SubDirectoryConstraint class.

WriteDescriptionTo ( MessageWriter writer ) : void

Write the constraint description to a MessageWriter

Private Methods

Method Description
BuildDirectoryList ( DirectoryInfo StartingDirectory ) : List

Builds a list of DirectoryInfo objects, recursing where necessary

DirectoriesEqual ( DirectoryInfo expected, DirectoryInfo actual ) : bool

Method to compare two DirectoryInfo objects

IsDirectoryOnPath ( DirectoryInfo ParentDirectory, DirectoryInfo SearchDirectory ) : bool

private method to determine whether a directory is within the path

Method Details

Matches() public method

Test whether the constraint is satisfied by a given value
public Matches ( object actual ) : bool
actual object The value to be tested
return bool

SubDirectoryConstraint() public method

Initializes a new instance of the T:SubDirectoryConstraint class.
public SubDirectoryConstraint ( DirectoryInfo dirInfo ) : System
dirInfo System.IO.DirectoryInfo The dir info.
return System

WriteDescriptionTo() public method

Write the constraint description to a MessageWriter
public WriteDescriptionTo ( MessageWriter writer ) : void
writer MessageWriter The writer on which the description is displayed
return void