Table of Contents

Class AutomatedTests

Namespace
CMS.Tests
Assembly
CMS.Tests.dll

Base class for advanced tests

[Category.Automated]
public class AutomatedTests
Inheritance
object
AutomatedTests
Derived
Extension Methods

Constructors

AutomatedTests()

Constructor

protected AutomatedTests()

Properties

ApplicationInitialized

Returns true if the application is currently initialized

protected bool ApplicationInitialized { get; set; }

Property Value

bool

IsFirstTestInFixture

Returns true when the first test in the fixture is going to run.

protected bool IsFirstTestInFixture { get; }

Property Value

bool

TemporaryAppPath

Temporary application path for current test

protected string TemporaryAppPath { get; }

Property Value

string

Methods

AddExtender(TestExtender)

Adds the test extender

[Obsolete("Method was not intended for public use and will be removed in the next version.")]
public void AddExtender(TestExtender extender)

Parameters

extender TestExtender

CleanUpBase()

Clean up after each test

public void CleanUpBase()

CleanUpDataContext()

Cleans up the data context

protected static void CleanUpDataContext()

CleanUpFixtureBase()

One time clean up after all tests in test fixture are run

public void CleanUpFixtureBase()

Dispose()

Disposes the object

public void Dispose()

EndApplication()

Performs application end

protected void EndApplication()

EnsureServiceContainer()

Builds a ServiceProvider within IoC container if there is none yet.

protected void EnsureServiceContainer()

GetTestExtenders()

Gets the current test extenders

[Obsolete("Method was not intended for public use and will be removed in the next version.")]
protected virtual List<TestExtender> GetTestExtenders()

Returns

List<TestExtender>

InitApplication()

Performs application initialization if not already initialized

protected virtual void InitApplication()

InitBase()

Set up before each test

public void InitBase()

InitFixtureBase()

One time set up before first test in test fixture is run

public void InitFixtureBase()

PreInitApplication()

Performs application pre-initialization if not already initialized

protected virtual void PreInitApplication()

RegisterTestServices()

Performs registration of extra services within IoC container between application pre-init and init.

protected virtual void RegisterTestServices()

ResetAppState()

Resets the application state

public void ResetAppState()

RunExtenderAction<TCurrentLevel>(Action<TestExtender>, bool)

Gets the current test extenders

[Obsolete("Method was not intended for public use and will be removed in the next version.")]
protected virtual void RunExtenderAction<TCurrentLevel>(Action<TestExtender> action, bool reversed = false) where TCurrentLevel : AutomatedTests

Parameters

action Action<TestExtender>
reversed bool

Type Parameters

TCurrentLevel

TestMilestone()

Milestone

[Obsolete("Method was not intended for public use and will be removed in the next version.")]
protected void TestMilestone()