Namespace: OpenEdge.ABLUnit.Model
Class
TestCase
Parent classes:
Inherits: OpenEdge.ABLUnit.Model.TestEntity
Implements: OpenEdge.ABLUnit.Model.IRunnableEntity

Copyright (c) 2020 by Progress Software Corporation. All rights reserved.
File:TestCase
Purpose:A TestEntity that is capable of running test classes and procedures,
their lifecycle methods and their test methods
Author(s):pjudge
Created:2019-12-09
/* The current object being tested




Method Summary
Options Name Purpose
addTestEntity (TestEntity)
Inherited from OpenEdge.ABLUnit.Model.TestEntity
AddTestResult (TestTestResult) /* Adds a test result for this entity. NOTE: This method increments the Summary's counts so only call it AFTER the result is updated/complete Entities like a method or a class/procedure may have one or more before- and after- lifecycle methods in addition to the 'main' or test method. @param TestTestResult The current result */
Inherited from OpenEdge.ABLUnit.Model.TestEntity
DestroyEntity () /* Stops/destroys this test entity */
INTEGER getChildrenSize ()
Inherited from OpenEdge.ABLUnit.Model.TestEntity
CHARACTER GetExpectedErrorType (character) /* Expands the given expected error type if it is a recognised abbreviation. @param character An abbreviated OOABL (error) type @return character A 'resolved' error type */
Array getTestEntities ()
Inherited from OpenEdge.ABLUnit.Model.TestEntity
OpenEdge.ABLUnit.Results.TestTestResult GetTestResults () /* Returns an array of test results for this entity @return TestTestResult[] The results for this entity. May be indeterminate */
Inherited from OpenEdge.ABLUnit.Model.TestEntity
InstantiateEntity () /* Runs/new's this test entity */
InvokeTestMethod (TestInfo) /* Performs the invocation of the test method in this test entity @param TestInfo Data about the method to run */
RunChild (TestEntity) /* Runs a child test entity in the test entity. @param TestEntity The test method to run */
RunLifecycleMethods (ITestInfoList, TestEntity, logical) /* Runs the lifecycle methods for a given annotation. All lifecycle methods are run, even if one fails. @param ITestInfoList The list of lifecycle methods @param TestEntity The test for which the lifecycle methods were run (class/procedure/method) @param logical If TRUE then a failure will increment the number of test in the entity's summary; if FALSE or UNKNOWN the number of tests is not changed */
StartEntity () /* Runs/starts the test entity This method adds a TestResult iff there's an error or failure. */
StopEntity () /* Stops/destroys the test entity */

Constructor Summary
Options Name Purpose
TestCase (integer) /* Constructor @param integer The id of the test entity */

Property Summary
Options Name Purpose
OpenEdge.ABLUnit.Reflection.TestAnnotationInfo AnnotationInfo
Progress.Lang.Object Entity
INTEGER id
Inherited from OpenEdge.ABLUnit.Model.TestEntity
CHARACTER name
Inherited from OpenEdge.ABLUnit.Model.TestEntity
TestTypeResult Summary
Inherited from OpenEdge.ABLUnit.Model.TestEntity
DECIMAL timeTaken
Inherited from OpenEdge.ABLUnit.Model.TestEntity


Method Detail
Top

PUBLIC addTestEntity (TestEntity)

Inherited from OpenEdge.ABLUnit.Model.TestEntity
Parameters:
testEntity OpenEdge.ABLUnit.Model.TestEntity
Top

PUBLIC AddTestResult (TestTestResult)

Inherited from OpenEdge.ABLUnit.Model.TestEntity
/* Adds a test result for this entity.
NOTE: This method increments the Summary's counts so only call it AFTER the
result is updated/complete
Entities like a method or a class/procedure may have one or more before- and after-
lifecycle methods in addition to the 'main' or test method.
Parameters:
pResult OpenEdge.ABLUnit.Results.TestTestResult
Top

PROTECTED DestroyEntity ()

/* Stops/destroys this test entity
Top

PUBLIC INTEGER getChildrenSize ()

Inherited from OpenEdge.ABLUnit.Model.TestEntity
Returns INTEGER
Top

PROTECTED CHARACTER GetExpectedErrorType (character)

/* Expands the given expected error type if it is a recognised abbreviation.
Parameters:
pShortError CHARACTER
Returns CHARACTER
character A 'resolved' error type
Top

PUBLIC Array getTestEntities ()

Inherited from OpenEdge.ABLUnit.Model.TestEntity
Returns Array
Top

PUBLIC OpenEdge.ABLUnit.Results.TestTestResult GetTestResults ()

Inherited from OpenEdge.ABLUnit.Model.TestEntity
/* Returns an array of test results for this entity
Returns OpenEdge.ABLUnit.Results.TestTestResult
TestTestResult[] The results for this entity. May be indeterminate
Top

PROTECTED InstantiateEntity ()

/* Runs/new's this test entity
Top

PROTECTED InvokeTestMethod (TestInfo)

/* Performs the invocation of the test method in this test entity
Parameters:
pMethodInfo OpenEdge.ABLUnit.Reflection.TestInfo
Top

PUBLIC RunChild (TestEntity)

/* Runs a child test entity in the test entity.
Parameters:
pChild OpenEdge.ABLUnit.Model.TestEntity
Top

PROTECTED RunLifecycleMethods (ITestInfoList, TestEntity, logical)

/* Runs the lifecycle methods for a given annotation.
All lifecycle methods are run, even if one fails.
or UNKNOWN the number of tests is not changed
Parameters:
pMethods OpenEdge.ABLUnit.Reflection.ITestInfoList
pEntity OpenEdge.ABLUnit.Model.TestEntity
pIncrementTestOnFailure LOGICAL
Top

PUBLIC StartEntity ()

/* Runs/starts the test entity
This method adds a TestResult iff there's an error or failure.
Top

PUBLIC StopEntity ()

/* Stops/destroys the test entity


Constructor Detail
Top

PUBLIC TestCase (integer)

/* Constructor
Parameters:
id1 INTEGER


Property Detail
Top

PUBLIC OpenEdge.ABLUnit.Reflection.TestAnnotationInfo AnnotationInfo

Returns OpenEdge.ABLUnit.Reflection.TestAnnotationInfo
Top

PUBLIC Progress.Lang.Object Entity

Returns Progress.Lang.Object
Top

PUBLIC INTEGER id

Inherited from OpenEdge.ABLUnit.Model.TestEntity
Returns INTEGER
Top

PUBLIC CHARACTER name

Inherited from OpenEdge.ABLUnit.Model.TestEntity
Returns CHARACTER
Top

PUBLIC TestTypeResult Summary

Inherited from OpenEdge.ABLUnit.Model.TestEntity
Returns TestTypeResult
Top

PUBLIC DECIMAL timeTaken

Inherited from OpenEdge.ABLUnit.Model.TestEntity
Returns DECIMAL


Copyright © 2020 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 12.2.0