Internal

Helpers

  • [Internal] Used for handling fatal errors inside library.

    See more

    Declaration

    Swift

    public struct FatalErrorUtil
  • Declaration

    Swift

    public extension Optional
    extension Optional: OptionalType
    extension Optional:
        ExpressibleByStringLiteral,
        ExpressibleByExtendedGraphemeClusterLiteral,
        ExpressibleByUnicodeScalarLiteral
        where Wrapped: ExpressibleByStringLiteral
    extension Optional: ExpressibleByIntegerLiteral where Wrapped: ExpressibleByIntegerLiteral
    extension Optional: ExpressibleByBooleanLiteral where Wrapped: ExpressibleByBooleanLiteral
    extension Optional: ExpressibleByFloatLiteral where Wrapped: ExpressibleByFloatLiteral
    extension Optional: ExpressibleByArrayLiteral where Wrapped: ExpressibleByArrayLiteral
    extension Optional: ExpressibleByDictionaryLiteral where Wrapped: ExpressibleByDictionaryLiteral, Wrapped.Key: Hashable
  • Declaration

    Swift

    extension UInt: Countable
  • [Internal] Generic Mock library errors

    • notStubed: Calling method on mock, for which return value was not yet stubbed. DO NOT USE it as stub throw value!
    See more

    Declaration

    Swift

    public enum MockError : Error
  • [Internal] Possible Given products. Method can either return or throw an error (in general)

    • return: Return value
    • throw: Thrown error value
    See more

    Declaration

    Swift

    public enum StubProduct
  • [Internal] Allows to reduce Mock.generated.swif size, by moving part of implementation here.

    See more

    Declaration

    Swift

    open class StubbedMethod : WithStubbingPolicy
  • [Internal] Fails flow with given message

    Declaration

    Swift

    public func Failure(_ message: String) -> Swift.Never

    Parameters

    message

    Failure message

    Return Value

    Never

  • [internal] Assertion used by mocks and Verify methods

    Declaration

    Swift

    public func MockyAssert(
        _ expression: @autoclosure () -> Bool,
        _ message: @autoclosure () -> String = "Verify failed",
        file: StaticString = #file,
        line: UInt = #line
    )

    Parameters

    expression

    Expression to assert on

    message

    Message

    file

    File name (levae default)

    line

    Line (levae default)

Optionality checks

  • Protocol around Optional, allowing additional checks and features on Paramater where value is optional.

    See more

    Declaration

    Swift

    public protocol OptionalType : ExpressibleByNilLiteral

Sequencing policy

Stubbing Policy