RawRepresentable

public extension RawRepresentable where Self: LaunchEnvironmentWithSingleValue

Provides default implementation for any RawRepresentable type to represent a launch environment in a few simple steps.

Example:

enum LimitedOptionsEnvironment: String, LaunchEnvironmentWithSingleValue {
    case one
    case two

    var key: String {
        return "LimitedOptionsEnvironment"
    }
}

Usage:

let app = XCUIApplication()
TestLauncher(options: [
    LimitedOptionsEnvironment.one
]).configure(app).launch()
  • Value is the same type as the raw value.

    Declaration

    Swift

    typealias Value = RawValue
  • Returns rawValue.

    Declaration

    Swift

    var value: RawValue { get }