Classes
- ArgumentCaptor
-
Captures method arguments passed during mock invocations.
- ArgumentMatcher
-
Matches argument values with a comparator.
- StaticMock
-
Used to store invocations on static or class scoped methods.
- VariableDeclaration
-
Mockable variable declarations.
- PropertyGetterDeclaration
-
Mockable property getter declarations.
- PropertySetterDeclaration
-
Mockable property setter declarations.
- FunctionDeclaration
-
Mockable function declarations.
- ThrowingFunctionDeclaration
-
Mockable throwing function declarations.
- SubscriptDeclaration
-
Mockable subscript declarations.
- SubscriptGetterDeclaration
-
Mockable subscript getter declarations.
- SubscriptSetterDeclaration
-
Mockable subscript setter declarations.
- MockingContext
-
Stores invocations received by mocks.
- StubbingManager
-
An intermediate object used for stubbing declarations returned by
given
. - StubbingContext
-
Stores stubbed implementations used by mocks.
- NonEscapingClosure
-
Placeholder for non-escaping closure parameter types.
Structures
- CountMatcher
-
Checks whether a number matches some expected count.
- MockMetadata
-
Stores information about generated mocks.
- Mockable
-
Represents a mocked declaration that can be stubbed or verified.
- ImplementationProvider
-
Provides implementation functions used to stub behavior and return values.
- ValueProvider
-
Provides concrete instances of types.
- SourceLocation
-
References a line of code in a file.
- OrderedVerificationOptions
-
Additional options to increase the strictness of
inOrder
verification blocks. - VerificationManager
-
An intermediate object used for verifying declarations returned by
verify
.
Enumerations
- StubbingManager.TransitionStrategy
-
When to use the next chained implementation provider.
Protocols
- Mock
-
All generated mocks conform to this protocol.
- Declaration
-
All mockable declaration types conform to this protocol.
- Providable
-
A type that can provide concrete instances of itself.
- TestFailer
-
A type that can handle test failures emitted by Mockingbird.
Functions
- any(_:containing:)
-
Matches any collection containing all of the values.
- any(_:containing:)
-
Matches any dictionary containing all of the values.
- any(_:keys:)
-
Matches any dictionary containing all of the keys.
- any(_:count:)
-
Matches any collection with a specific number of elements.
- notEmpty(_:)
-
Matches any collection with at least one element.
- around(_:tolerance:)
-
Matches floating point arguments within some tolerance.
- exactly(_:)
-
Matches an exact count.
- atLeast(_:)
-
Matches greater than or equal to some count.
- atMost(_:)
-
Matches less than or equal to some count.
- between(_:)
-
Matches counts that fall within some range.
- not(_:)
-
Negate a count matcher, only passing on non-matching counts.
- not(_:)
-
Negate an exact count, only passing on non-matching counts.
- any(_:)
-
Matches all argument values.
- any(_:of:)
-
Matches argument values equal to any of the provided values.
- any(_:of:)
-
Matches argument values identical to any of the provided values.
- any(_:where:)
-
Matches any argument values where the predicate returns
true
. - notNil(_:)
-
Matches any non-nil argument value.
- mock(_:)
-
Returns a mock of a given type.
- reset(_:)
-
Remove all recorded invocations and configured stubs.
- clearInvocations(on:)
-
Remove all recorded invocations.
- clearStubs(on:)
-
Remove all concrete stubs.
- clearDefaultValues(on:)
-
Remove all registered default values.
- useDefaultValues(from:on:)
-
Start returning default values for unstubbed methods on multiple mocks.
- useDefaultValues(from:on:)
-
Start returning default values for unstubbed methods on a single mock.
- sequence(of:)
-
Stub a sequence of values.
- sequence(of:)
-
Stub a sequence of implementations.
- loopingSequence(of:)
-
Stub a looping sequence of values.
- loopingSequence(of:)
-
Stub a looping sequence of implementations.
- finiteSequence(of:)
-
Stub a finite sequence of values.
- finiteSequence(of:)
-
Stub a finite sequence of implementations.
- lastSetValue(initial:)
-
Stubs a variable getter to return the last value received by the setter.
- given(_:)
-
Stub one or more declarations to return a value or perform an operation.
- eventually(_:_:)
-
Create a deferrable test expectation from a block containing verification calls.
- inOrder(with:file:line:_:)
-
Enforce the relative order of invocations.
- verify(_:file:line:)
-
Verify that a mock recieved a specific invocation some number of times.
- swizzleTestFailer(_:)
-
Change the current global test failer.
- MKBFail(_:isFatal:file:line:)
-
Called by Mockingbird on test assertion failures.
Variables
- never
-
A count of zero.
- once
-
A count of one.
- twice
-
A count of two.
Operators
- ~>
-
The stubbing operator is used to bind an implementation to an intermediary
Stub
object.
Extensions
- Array
- Dictionary
- Optional
- Set