Namespace: Consultingwerk.SmartUnit
Class 
SmartUnit Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:SmartUnit
Purpose:SmartUnit core test execution
Description:Invoked by the smartunit.p
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Fri Mar 22 10:46:21 CET 2013



Top Method Summary
Options Name Purpose
+ Consultingwerk.Studio.IClassAnnotationParser GetAnnotationParser (character, logical) Returns the reference to the IClassAnnotationParser instance that should be used bny this TestRunner instance
+ CHARACTER GetTestSuiteParameter (character) Returns the value of a PCTRun parameter
+ Consultingwerk.Framework.Collections.CharacterList ParseFileset (character) Parses a fileset
+ Consultingwerk.Framework.Collections.CharacterList ParseFileset (character, character) Parses a fileset
+ Consultingwerk.SmartUnit.ITestSuite ParseTestParameters (handle) Parses the SmartUnit Parameters
+ WriteTestResult (character, dataset) Writes the test result to a JUnit compatible XML file

Top Constructor Summary
Options Name Purpose
- SmartUnit () Private Constructor of the SmartUnit class

Top Property Summary
Options Name Purpose
+ LOGICAL Active Flag indicating that code is executed from within a unit test
+ Consultingwerk.ListNameValuePair CurrentTestParameters Contains the parameters (e.g. from Annotations) for the currently executed test
+ HANDLE PctLibrary Returns the procedure-handle of the PCT Library
+ LOGICAL Verbose Tells tests to produce verbose output


Method Detail
Top

PUBLIC Consultingwerk.Studio.IClassAnnotationParser GetAnnotationParser (character, logical)

Purpose: Returns the reference to the IClassAnnotationParser instance that
should be used bny this TestRunner instance
Notes: Factory method for the IClassAnnotationParser implementation

Parameters:
pcClassFileName CHARACTER
The name of the .cls file to parse
plForceXmlXref LOGICAL
Logical value indicating if on Windows the XmlXref based class annotation parser should be used
Returns Consultingwerk.Studio.IClassAnnotationParser
The reference to the IClassAnnotationParser instance that should be used bny this TestRunner instance
Top

PUBLIC CHARACTER GetTestSuiteParameter (character)

Purpose: Returns the value of a PCTRun parameter
Notes:

Parameters:
pcParameterName CHARACTER
The name of the parameter to return
Returns CHARACTER
The parameter value
Top

PUBLIC Consultingwerk.Framework.Collections.CharacterList ParseFileset (character)

Purpose: Parses a fileset
Notes:

Parameters:
pcFileset CHARACTER
The fileset such as Consultingwerk.SmartUnitTest.*,Consultingwerk.Test.SingleTest
Returns Consultingwerk.Framework.Collections.CharacterList
The CharacterList with the names of the classes available
Top

PUBLIC Consultingwerk.Framework.Collections.CharacterList ParseFileset (character, character)

Purpose: Parses a fileset
Notes:

Parameters:
pcFileset CHARACTER
The fileset such as Consultingwerk.SmartUnitTest.*,Consultingwerk.Test.SingleTest
pcBaseFolder CHARACTER
The base folder to search for class names
Returns Consultingwerk.Framework.Collections.CharacterList
The CharacterList with the names of the classes available
Top

PUBLIC Consultingwerk.SmartUnit.ITestSuite ParseTestParameters (handle)

Purpose: Parses the SmartUnit Parameters
Notes: Parameters are passed using PCTRun parameters

Parameters:
phPctLibrary HANDLE
The handle of the PCT library that allows access to the PCTRun parameters
Returns Consultingwerk.SmartUnit.ITestSuite
The ITestSuite instance with the parameters for the test suite
Top

PUBLIC WriteTestResult (character, dataset)

Purpose: Writes the test result to a JUnit compatible XML file
Notes:

Parameters:
pcOutputFile CHARACTER
The output file name to write to
dsTestsuites DATASET
The dataset with the test result


Constructor Detail
Top

PRIVATE SmartUnit ()

Purpose: Private Constructor of the SmartUnit class
Notes: Disallow instance creation



Property Detail
Top

PUBLIC LOGICAL Active

Purpose: Flag indicating that code is executed from within a unit test
Notes: Property can only be assigned from Consultingwerk/SmartUnit/runtest.p

Returns LOGICAL
Top

PUBLIC Consultingwerk.ListNameValuePair CurrentTestParameters

Purpose: Contains the parameters (e.g. from Annotations) for the currently
executed test
Notes: Property is typically set by the TestRunner while executing a
single test

Returns Consultingwerk.ListNameValuePair
Top

PUBLIC HANDLE PctLibrary

Purpose: Returns the procedure-handle of the PCT Library
Notes: This library provides access to the PCTRun parameters

Returns HANDLE
Top

PUBLIC LOGICAL Verbose

Purpose: Tells tests to produce verbose output
Notes: Set by the PCT environment based on the verbose attribute,
see https://code.google.com/p/pct/wiki/PCTRun

Returns LOGICAL


©2006-2016 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       26.08.2016 08:44:57