When the Code Generation Engine processes a transaction or test method it checks whether the method has
TestAttribute attributes applied to it. A project attribute is generated for each test attribute. The name and default values are used
to generate project attributes with the same names and default values. To make it easier for engineers who customize BDL script,
comments are scripted before the
DotNetCallMethod.
// Requires attribute "Attr1" with the default value: "Value1" DotNetCallMethod(hVuser1, "TMain1");
// Requires attribute "Attr2" with the default value: "Value2"
// Requires attribute "Attr3" with the default value: "Value3" DotNetCallMethod(hVuser1, "TestMeth1");
Test Attributes
C# Code
|
BDL Script
|
[Transaction(Etranstype.TRANSTYPE_MAIN)]
[TestAttribute("Attr", "Value1")]
public void TMain1()
{
}
[TestMethod]
[TestAttribute("Attr2", "Value2")]
[TestAttribute("Attr3", "Value3")]
public void TestMeth1()
{
}
|
dcltrans
transaction TMain1
begin
// Requires attribute "Attr1"
// with the default value: "Value1"
DotNetCallMethod(hVuser1, "TMain1");
// Requires attribute "Attr2"
// with the default value: "Value2"
// Requires attribute "Attr3"
// with the default value: "Value3"
DotNetCallMethod(hVuser1, "TestMeth1");
end;
|