class %ZHSLIB.PackageManager.Developer.Processor.UnitTest extends %ZHSLIB.PackageManager.Developer.Processor.Abstract

Property Inventory (Including Private)

Method Inventory (Including Private)


parameter ATTRIBUTES = Phase,Package,ManagerClass,Format;
Comma-separated list of resource attribute names that this processor uses
parameter DESCRIPTION = Loads unit tests (extending %UnitTest.TestCase) from the specified directory and runs them during (Phase). For modules in development mode, the unit tests are always loaded and are not deleted after they are run.;
Description of resource processor class (shown in UI)


property EmbeddedProcessor as %ZHSLIB.PackageManager.Developer.Processor.Default.Package [ Private ];
Embedded processor to handle unit test resources as a package.
Property methods: EmbeddedProcessorGet(), EmbeddedProcessorGetSwizzled(), EmbeddedProcessorIsValid(), EmbeddedProcessorNewObject(), EmbeddedProcessorSet()
property Format as %String (VALUELIST = ",UDL,XML");
Export format
Property methods: FormatDisplayToLogical(), FormatGet(), FormatIsValid(), FormatLogicalToDisplay(), FormatLogicalToOdbc(), FormatNormalize(), FormatSet()
property ManagerClass as %Dictionary.Classname [ InitialExpression = "%ZHSLIB.PackageManager.Developer.UnitTest.Manager" ];
Class extending %UnitTest.Manager to use to run unit tests
Property methods: ManagerClassGet(), ManagerClassIsValid(), ManagerClassSet()
property Package as %String (MAXLEN = 255) [ Required ];
Package containing unit tests - this will be mapped properly on development systems, and unit tests won't be deleted in the "test" phase if any classes in it exist.
Property methods: PackageDisplayToLogical(), PackageGet(), PackageIsValid(), PackageLogicalToDisplay(), PackageLogicalToOdbc(), PackageNormalize(), PackageSet()
property Phase as %ZHSLIB.PackageManager.Core.ListOfOptions (VALUELIST = ",test,verify") [ InitialExpression = $ListBuild("test") , Required ];
Phase in which the unit tests run - "test" (dev namespace), "verify" (separate, clean namespace), or "test,verify" (to run in both cases).
Property methods: PhaseDisplayToLogical(), PhaseGet(), PhaseIsValid(), PhaseLogicalToDisplay(), PhaseLogicalToOdbc(), PhaseLogicalToXSD(), PhaseOdbcToLogical(), PhaseSet(), PhaseXSDToLogical()


private method %OnNew(pResourceReference As %ZHSLIB.PackageManager.Developer.ResourceReference) as %Status [ Language = objectscript ]
Inherited description: This callback method is invoked by the %New() method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

method GetSourceControlInfo(Output pInfo As %ZHSLIB.PackageManager.Developer.Extension.SourceControl.ResourceInfo) as %Status [ Language = objectscript ]
method OnAfterPhase(pPhase As %String, ByRef pParams) as %Status [ Language = objectscript ]
method OnExportItem(pFullExportPath As %String, pItemName As %String, ByRef pItemParams, ByRef pParams, Output pItemHandled As %Boolean = 0) as %Status [ Language = objectscript ]
method OnGetUniqueName(Output pUniqueName) [ Language = objectscript ]
Returns a unique name for this resource. Default implementation, leaving pUniqueName undefined, reverts to default behavior. An empty string indicates guaranteed uniqueness (useful for folders relative to module root)
method OnItemRelativePath(pItemName As %String) as %String [ Language = objectscript ]
Returns the path relative to the module root for item pItemName within this resource.
method OnPhase(pPhase As %String, ByRef pParams, Output pResourceHandled As %Boolean = 0) as %Status [ Language = objectscript ]
Inherited description: Called as phase pPhase is executed for the resource. If pResourceHandled is set to true, then the default behavior for that resource will be bypassed in the current phase. Currently, this is only used in the Verify phase, because of different handling of intermediate error statuses. TODO: Implement for standard database resources (.INC, .CLS, etc.)
method OnResolveChildren(ByRef pResourceArray As %Library.String, pCheckModuleOwnership As %Library.Boolean) as %Status [ Language = objectscript ]
method TestsShouldRun(pPhase As %String, ByRef pParams) as %Boolean [ Language = objectscript ]

Inherited Members

Inherited Properties (Including Private)

Inherited Methods (Including Private)