Show / Hide Table of Contents

Class TestClassBase

Base class for XUnit-based test classes.

Inheritance
object
TestClassBase
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Benday.Common.Testing
Assembly: Benday.Common.Testing.dll
Syntax
public abstract class TestClassBase

Constructors

| Edit this page View Source

TestClassBase(ITestOutputHelper)

Constructor for the base class.

Declaration
public TestClassBase(ITestOutputHelper output)
Parameters
Type Name Description
ITestOutputHelper output

An instance of the XUnit ITestOutputHelper. This typically is provided by the XUnit runner itself at execution.

Properties

| Edit this page View Source

SampleFilesDirectoryName

Declaration
protected virtual string SampleFilesDirectoryName { get; }
Property Value
Type Description
string

Methods

| Edit this page View Source

GetPathToSampleFilesDirectory()

Declaration
protected virtual string GetPathToSampleFilesDirectory()
Returns
Type Description
string
| Edit this page View Source

GetPathToSampleFilesDirectory(string)

Declaration
protected string? GetPathToSampleFilesDirectory(string startingDir)
Parameters
Type Name Description
string startingDir
Returns
Type Description
string
| Edit this page View Source

GetPathToTestFile(string)

Declaration
protected string GetPathToTestFile(string callerFile = "")
Parameters
Type Name Description
string callerFile
Returns
Type Description
string
| Edit this page View Source

GetSampleFilePath(string)

Declaration
protected virtual string GetSampleFilePath(string fileName)
Parameters
Type Name Description
string fileName
Returns
Type Description
string
| Edit this page View Source

GetSampleFileText(string)

Declaration
protected virtual string GetSampleFileText(string fileName)
Parameters
Type Name Description
string fileName
Returns
Type Description
string
| Edit this page View Source

WriteLine(string)

Write a message to the test output.

Declaration
public void WriteLine(string message)
Parameters
Type Name Description
string message

Extension Methods

ObjectAssertExtensions.ShouldBeNull<T>(T?, string)
ObjectAssertExtensions.ShouldBeSameAs<T>(T, T, string)
ObjectAssertExtensions.ShouldEqual<T>(T, T, string)
ObjectAssertExtensions.ShouldNotBeNull<T>(T?, string)
ObjectAssertExtensions.ShouldNotBeSameAs<T>(T, T, string)
ObjectAssertExtensions.ShouldNotEqual<T>(T, T, string)
ObjectAssertExtensions.ShouldBeOfType<T>(object?, string)
ObjectAssertExtensions.ShouldNotBeOfType<T>(object?, string)
  • Edit this page
  • View Source
In this article
Back to top Copyright © www.benday.com | info@benday.com