Step 4: Creating new step methods

Create a new step file. The step file must:

  • Provide step definitions for the new step methods.
  • Inject the Context Factory

The following text is an example of a new BA_SubmissionSteps_Ext class.

package gw.cucumber.customer.steps.lob.ba

uses com.google.inject.Inject
uses cucumber.api.java.en.Given
uses gw.cucumber.context.api.ContextFactory
// additional uses statements may be needed

/**
 * Business Auto specific {@link Submission} job steps
 */
class BA_SubmissionSteps_Ext {

  @Inject
  var _contextFactory : ContextFactory

  @Given("^a Business Auto submission$")
  function aBusinessAutoSubmission() {
    _contextFactory.getSubmissionContext().createSubmissionSetup()
  }

}