LaunchEnvironmentWithSingleValue
public protocol LaunchEnvironmentWithSingleValue : LaunchEnvironmentProtocol
Protocol defining minimal requirements for launch environment option with single values.
Provides default implementation for handling singe launch environment by providing key
and value
.
Example:
public struct SimpleLaunchEnvironment: LaunchEnvironmentWithSingleValue {
public typealias Value = String
public let key = "LAUNCH_KEY"
public var value: String
}
let simple = SimpleLaunchEnvironment(value: "LaunchValue")
-
String representation of the environment key.
Declaration
Swift
var key: String { get }
-
Value of the launch argument.
Declaration
Swift
var value: Value { get }
-
uniqueIdentifier
Extension methodUnique value to use when comparing with other launch options.
Declaration
Swift
var uniqueIdentifier: String { get }
-
launchEnvironments
Extension methodDictionary added to
XCUIApplication
launchEnviroment
.Declaration
Swift
var launchEnvironments: [String : String]? { get }
-
launchEnvironments
Extension methodlaunchEnvironments
value depends onshouldCleanBefore
, iftrue
-CleanFlag
(defined inCleanableLaunchEnvironment
) is added at the beginning of LaunchEnvironment value.Example:
CleanableSimpleLaunchEnvironment(value: "PGS_WITH_LOVE", shouldCleanBefore: true).launchEnvironments
Output:
["LAUNCH_KEY": "AM_CLEAN_DATA_FLAG,PGS_WITH_LOVE"]
Declaration
Swift
var launchEnvironments: [String : String]? { get }