EventLaunchEnvironment

Launch environment supporting EventKit events. Expects bundle and file name for every file containing data of events to be added into calendar at test launch. Structure is defined in example project’s file events.json.

Example:

let recurringEvents: EventLaunchEnvironment = [ LaunchEnvironmentResourceValue(fileName: "monthly_events", bundleName: "Data") ]
let nearEvents = EventLaunchEnvironment(resources: (fileName: "todays_events", bundleName: "Test data"), (fileName: "this_week_events", bundleName: nil))
let nearEvents = EventLaunchEnvironment(shouldCleanBefore: true, resources: (fileName: "todays_events", bundleName: "Test data"), (fileName: "this_week_events", bundleName: nil))

Warning

Setting shouldCleanBefore to true will remove all events from a device.
  • Initializes EventLaunchEnvironment that can be passed to TestLauncher. If handler is added to LaunchEnvironmentManager default handling is provided by AutoMate - AppBuddy.

    Declaration

    Swift

    public init(shouldCleanBefore: Bool, valuesCollection: [Value])

    Parameters

    shouldCleanBefore

    Bool flag indicating if EKEvents should be removed before saving new ones.

    valuesCollection

    Array of all resource values to be passed.