Set up the class test
- Last Updated: January 16, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
In a test procedure, you must define a variable to hold the reference to the class instance. Since you are defining a variable of a class type, you must specify a using statement for that class at the top of your procedure.
Here is the setup code for testing the Emp class. It first
specifies the Enterprise.HR.Emp class in a
using statement. Then, it defines the variable,
EmpInstance that will hold a
reference to the Emp class instance. Next, it
specifies the file where test output will be written.
block-level on error undo, throw.
using Enterprise.HR.Emp.
// define the variable for holding the Emp instance
var Emp EmpInstance.
// set up the file for writing data
output to "/testResults/log/testEmp.out".
// more of test procedures