The DataSetup hierarchy

The DataSetup hierarchy consists of a series of classes. There is a parent DataSetup class in gw.cucumber.setup . This has a set of child classes, as shown below:

  • AccountDataSetup
  • JobDataSetup
    • SubmissionDataSetup
      • HOPSubmissionDataSetup
      • PASubmissionDataSetup
      • WCSubmissionDataSetup
    • NonSubmissionDataSetup
      • CancellationDataSetup
      • IssuanceDataSetup
      • PolicyChangeDataSetup
      • ReinstatementDataSetup
      • RenewalDataSetup
      • RewriteDataSetup

These classes provide methods to simplify the sharing of builders across different impl methods. For example, PASubmissionDataSetup has the following provideDefaults method:

01 override function provideDefaults() : PASubmissionBuilder {
02   provideDefaultDriver()
03   provideDefaultVehicle()
04   provideDefaultCoverages()
05   return Builder
06 }

Line 1 declares the method. Note that there are no input parameters. Also note that it returns a value of type PASubmissionBuilder.

Lines 2 through 4 execute methods that provide default objects for the submission.

Line 5 returns the PASubmissionBuilder. The builder now has values for a default driver, vehicle, and coverages. But, the actual PASubmission object has not yet been created.