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:
    • RemObjects.Elements.EUnit.dll  .NET, .NET Standard 2.0
    • remobjects.elements.eunit.jar  Cooper
    • EUnit.fx  Island, macOS
    • libEUnit.fx  Toffee
  • Namespace: RemObjects.Elements.EUnit
  • Platforms: .NET, .NET Standard 2.0, Cooper, Island, macOS, Toffee


Instance Methods


Setup  virtual .NET, .NET Standard 2.0, Cooper, Island, macOS

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

 

method Setup

 

void Setup()

 

func Setup()

 

void Setup()

 

Sub Setup()

Setup Setup()  virtual Toffee

 

func Setup(Setup )

Parameters:

  • :

SetupTest  virtual .NET, .NET Standard 2.0, Cooper, Island, macOS

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

 

method SetupTest

 

void SetupTest()

 

func SetupTest()

 

void SetupTest()

 

Sub SetupTest()

SetupTest SetupTest()  virtual Toffee

 

func SetupTest(SetupTest )

Parameters:

  • :

Teardown  virtual .NET, .NET Standard 2.0, Cooper, Island, macOS

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

 

method Teardown

 

void Teardown()

 

func Teardown()

 

void Teardown()

 

Sub Teardown()

Teardown Teardown()  virtual Toffee

 

func Teardown(Teardown )

Parameters:

  • :

TeardownTest  virtual .NET, .NET Standard 2.0, Cooper, Island, macOS

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

 

method TeardownTest

 

void TeardownTest()

 

func TeardownTest()

 

void TeardownTest()

 

Sub TeardownTest()

TeardownTest TeardownTest()  virtual Toffee

 

func TeardownTest(TeardownTest )

Parameters:

  • :