EventLaunchEnvironment
public struct EventLaunchEnvironment : CleanableLaunchEnvironmentWithMultipleValues, AutoMateLaunchEnvironment
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
SettingshouldCleanBefore to true will remove all events from a device.
-
Defines associated type from
LaunchEnvironmentProtocolto beLaunchEnvironmentResourceValue.Declaration
Swift
public typealias Value = LaunchEnvironmentResourceValue
-
Defines
LaunchEnvironmentResourceValueasAutoMateKey.events.Declaration
Swift
public static let key: AutoMateKey -
Array to store all resource values from which launch enviroment value is composed.
Declaration
Swift
public let valuesCollection: [Value] -
Flag that indicates if all
EKEvents should be removed before saving new ones.Declaration
Swift
public let shouldCleanBefore: Bool
-
Initializes
EventLaunchEnvironmentthat can be passed toTestLauncher. If handler is added toLaunchEnvironmentManagerdefault handling is provided by AutoMate - AppBuddy.Declaration
Swift
public init(shouldCleanBefore: Bool, valuesCollection: [Value])Parameters
shouldCleanBeforeBoolflag indicating ifEKEvents should be removed before saving new ones.valuesCollectionArrayof all resource values to be passed.
EventLaunchEnvironment Structure Reference