Expectation

public struct Expectation<T>

Undocumented

  • Undocumented

    Declaration

    Swift

    public let expression: Expression<T>
  • Undocumented

    Declaration

    Swift

    public init(expression: Expression<T>)
  • Undocumented

    Declaration

    Swift

    public func verify(_ pass: Bool, _ message: FailureMessage)
  • Tests the actual value using a matcher to match.

    Declaration

    Swift

    @discardableResult
    public func to(_ predicate: Predicate<T>, description: String? = nil) -> Expectation<T>
  • Tests the actual value using a matcher to not match.

    Declaration

    Swift

    @discardableResult
    public func toNot(_ predicate: Predicate<T>, description: String? = nil) -> Expectation<T>
  • Tests the actual value using a matcher to not match.

    Alias to toNot().

    Declaration

    Swift

    @discardableResult
    public func notTo(_ predicate: Predicate<T>, description: String? = nil) -> Expectation<T>
  • Tests the actual value using a matcher to match by checking continuously at each pollInterval until the timeout is reached.

    @discussion This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    Declaration

    Swift

    public func toEventually(_ predicate: Predicate<T>, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
  • Tests the actual value using a matcher to not match by checking continuously at each pollInterval until the timeout is reached.

    @discussion This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    Declaration

    Swift

    public func toEventuallyNot(_ predicate: Predicate<T>, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
  • Tests the actual value using a matcher to not match by checking continuously at each pollInterval until the timeout is reached.

    Alias of toEventuallyNot()

    @discussion This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    Declaration

    Swift

    public func toNotEventually(_ predicate: Predicate<T>, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
  • Tests the actual value using a matcher to never match by checking continuously at each pollInterval until the timeout is reached.

    @discussion This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    Declaration

    Swift

    public func toNever(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
  • Tests the actual value using a matcher to never match by checking continuously at each pollInterval until the timeout is reached.

    Alias of toNever()

    @discussion This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    Declaration

    Swift

    public func neverTo(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
  • Tests the actual value using a matcher to always match by checking continusouly at each pollInterval until the timeout is reached

    @discussion This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    Declaration

    Swift

    public func toAlways(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
  • Tests the actual value using a matcher to always match by checking continusouly at each pollInterval until the timeout is reached

    Alias of toAlways()

    @discussion This function manages the main run loop (NSRunLoop.mainRunLoop()) while this function is executing. Any attempts to touch the run loop may cause non-deterministic behavior.

    Declaration

    Swift

    public func alwaysTo(_ predicate: Predicate<T>, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil)
  • Nil

    Represents nil value to be used with the operator overloads for beNil.

    See more

    Declaration

    Swift

    public struct Nil : ExpressibleByNilLiteral
  • Undocumented

    Declaration

    Swift

    public static func == (lhs: Expectation, rhs: Expectation.Nil)
  • Undocumented

    Declaration

    Swift

    public static func != (lhs: Expectation, rhs: Expectation.Nil)

Available where T: Collection, T.Element: FloatingPoint

  • Undocumented

    Declaration

    Swift

    public static func  (lhs: Expectation, rhs: T)

Available where T: FloatingPoint

  • Undocumented

    Declaration

    Swift

    public static func  (lhs: Expectation, rhs: T)
  • Undocumented

    Declaration

    Swift

    public static func  (lhs: Expectation, rhs: (expected: T, delta: T))
  • Undocumented

    Declaration

    Swift

    public static func == (lhs: Expectation, rhs: (expected: T, delta: T))

Available where T: NMBDoubleConvertible

  • Undocumented

    Declaration

    Swift

    public static func  (lhs: Expectation, rhs: T)
  • Undocumented

    Declaration

    Swift

    public static func  (lhs: Expectation, rhs: (expected: T, delta: Double))
  • Undocumented

    Declaration

    Swift

    public static func == (lhs: Expectation, rhs: (expected: T, delta: Double))

Available where T == AnyObject

  • Undocumented

    Declaration

    Swift

    public static func === (lhs: Expectation, rhs: AnyObject?)
  • Undocumented

    Declaration

    Swift

    public static func !== (lhs: Expectation, rhs: AnyObject?)

Available where T == ()

  • Undocumented

    Declaration

    Swift

    public static func == (lhs: Expectation<()>, rhs: ())
  • Undocumented

    Declaration

    Swift

    public static func != (lhs: Expectation<()>, rhs: ())