C# Class Itenso.TimePeriodTests.TestUnitBase

Show file Open project: jwg4/date-difference

Public Methods

Method Description
AssertEqualLines ( string msgPrefix, TextReader expectedReader, TextReader actualReader ) : void
AssertEqualLines ( string msgPrefix, string expected, string actual ) : void

Protected Methods

Method Description
BuildTestResourceName ( string kind, int pos, bool fail, string ext ) : string
DoTest ( string kind, Stream testRes, string testCaseName ) : void
GetResourceAsStream ( string name ) : Stream

Opens a stream to the given embedded resource in the test assembly. Fails if the given test resource cannot be located in the assembly.

GetTestResource ( string filename ) : Stream
IterateResourceTestCases ( string kind, string ext, bool expectFailures ) : void

Private Methods

Method Description
Cleanup ( ) : void
Initialize ( ) : void

Method Details

AssertEqualLines() public static method

public static AssertEqualLines ( string msgPrefix, TextReader expectedReader, TextReader actualReader ) : void
msgPrefix string
expectedReader System.IO.TextReader
actualReader System.IO.TextReader
return void

AssertEqualLines() public static method

public static AssertEqualLines ( string msgPrefix, string expected, string actual ) : void
msgPrefix string
expected string
actual string
return void

BuildTestResourceName() protected method

protected BuildTestResourceName ( string kind, int pos, bool fail, string ext ) : string
kind string
pos int
fail bool
ext string
return string

DoTest() protected method

protected DoTest ( string kind, Stream testRes, string testCaseName ) : void
kind string
testRes Stream
testCaseName string
return void

GetResourceAsStream() protected method

Opens a stream to the given embedded resource in the test assembly. Fails if the given test resource cannot be located in the assembly.
protected GetResourceAsStream ( string name ) : Stream
name string the name of the embedded resource without assembly prefix
return Stream

GetTestResource() protected method

protected GetTestResource ( string filename ) : Stream
filename string
return Stream

IterateResourceTestCases() protected method

protected IterateResourceTestCases ( string kind, string ext, bool expectFailures ) : void
kind string
ext string
expectFailures bool
return void