Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TestCase

Hierarchy

  • TestCase

Index

Constructors

constructor

  • Parameters

    • Optional name: string

    Returns TestCase

Properties

Protected name

name: string

Methods

addTestMethod

  • addTestMethod(method: Method): void
  • Parameters

    Returns void

countTests

  • countTests(): number
  • Counts the number of test cases that will be run by this test.

    Returns number

getName

  • getName(): string
  • Returns string

getTestMethods

  • getTestMethods(): {}
  • Returns {}

run

  • A convenience method to run this test, collecting the results with a TestResult object.

    see

    TestResult

    Parameters

    Returns TestResult

runMethod

  • runMethod(name: string): void
  • Runs its a method by name.

    throws

    Throwable if any exception is thrown

    Parameters

    • name: string

    Returns void

Protected setUp

  • setUp(): void
  • Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

    throws

    {Exception} Throwable if any exception is thrown

    Returns void

Protected tearDown

  • tearDown(): void
  • Tears down the fixture, for example, close a network connection. This method is called after a test is executed.

    throws

    {Exception} Throwable if any exception is thrown

    Returns void