Test

Overview

Test is a base class for all EUnit tests.

All tests must descend from the Test class in order to be detectable by the Discovery class.

This class provides set of virtual methods that can be used to perfom test initialization/finalization steps.

Use case

You will use this class as a base class for your own tests.

type
  MyTestClass = public class (Test)
  public
    method Setup; override;
    method Teardown; override;
    method SetupTest; override;
    method TeardownTest; override;
  public
    method MyTestMethod;
  end;

Location

  • Reference:
    • EUnit.fx  Island, macOS
    • RemObjects.Elements.EUnit.dll  .NET, .NET Standard 2.0
    • remobjects.elements.eunit.jar  Cooper
    • libEUnit.fx  Toffee
  • Namespace: RemObjects.Elements.EUnit
  • Platforms: .NET, .NET Standard 2.0, Cooper, Island, macOS, Toffee


Instance Methods


Setup  virtual

When overriden in a child this method is called before each test method.

 

method Setup

 

void Setup()

 

func Setup()

 

void Setup()

 

Sub Setup()

SetupTest  virtual

When overriden in a child this method is called before first test method.

 

method SetupTest

 

void SetupTest()

 

func SetupTest()

 

void SetupTest()

 

Sub SetupTest()

Teardown  virtual

When overriden in a child this method is called after each test method.

 

method Teardown

 

void Teardown()

 

func Teardown()

 

void Teardown()

 

Sub Teardown()

TeardownTest  virtual

When overriden in a child this method is called after last test method.

 

method TeardownTest

 

void TeardownTest()

 

func TeardownTest()

 

void TeardownTest()

 

Sub TeardownTest()