background image
<< operation_arglist Variable | Variables Used in EJB Templates >>
<< operation_arglist Variable | Variables Used in EJB Templates >>

Variables Used in COM/Visual Basic Templates

124
Appendix A - Template Replacement Variables
Variables Used Only with the COM/Visual Basic Templates
The following table lists the replacement variables that are used only with the
COM/VB unit test generation templates:
Variable
Description and Example
<interface_name>
Interface name of the operation selected for generation.
Example:
Rose Item Fully Qualified Name :=
"Logical
View::COM::MyComponent::_MyInterface::MyOperationUnderTest"
Before: <Interface_name>
After: _MyInteface
Note: Same as <class_name> for VB scripts generated from COM interfaces.
<library_name>
Library name that contains the class that is implementing this operation,
calculated as:
Dim rsModule As RoseModule
rsModule = cls.GetAssigendModules(1)
Dim rsProp As RoseProperty
rsProp = rsModule.FindProperty("COM","library")
<library_name> = rsProp.Value
Example:
Rose Item Fully Qualified Name :=
"Component View::COM::MyComponent"
Before: Set obj = CreateObject("<library_name>.Foo")
After: Set obj = CreateObject("MyComponent.Foo")
<coclass_name>
CoClass that implements the interface that the operation belongs to.
If more than one coclass implements the interface, the user is prompted to
choose a CoClass.
Example:
Rose Operation := "Logical View::COM::MyComponent::_Account::Post"
Rose Interface := "Logical View::COM::MyComponent::_Account"
Rose CoClass := "Logical View::COM::MyComponent::Account"
Before: Set obj = CreateObject("MyComponent.<coclass_name>")
After: Set obj = CreateObject("MyComponent.Account")