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

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()

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()