Step 3: Creating the context API interface


For step 3, you must create a new CalendarContext_Ext class.

Create an interface for the new context API interface.

The following text is an example of a new CalendarContext_Ext interface.

package gw.cucumber.customer.context.api

// additional uses statements may be needed

interface CalendarContext_Ext {

   /**
   * Set the application date to the first date on or after the current application date that is the given day of week.
   *
   * @param dayOfWeek
   */
   function setTodaysDate(dayOfWeek : String)

   /**
   * Create a holiday for the day after the application date.
   */
   function createHolidayForTomorrow()

   /**
   * Create an activity with default values using the given activity pattern.
   *
   * @param activityPattern
   */
   function createActivityFromActivityPattern(activityPattern : String)

   /**
   * Verify that an activity exists whose activity pattern is the current pattern.
   *
   * @param activityPattern
   */
   function verifyActivity(activityPattern : String)

   /**
   * Verify that the difference between the application date and the activity's due date is equal to the expected offset
   *
   * @param dueDateOffset
   */
   function verifyTimeUntilActivityIsDue(dueDateOffset : int)

}