From 50feb5e24587091abfc5c37b2dc9be7c1bbdd7f0 Mon Sep 17 00:00:00 2001 From: Andrew Chang <47129469+andrewchang-bird@users.noreply.github.com> Date: Thu, 13 Aug 2020 10:11:34 -0700 Subject: [PATCH] Bump versions to 0.15.0 (#166) --- Package.swift | 2 +- README-0.15.md => README-0.16.md | 8 +- README.md | 10 +- Sources/MockingbirdCli/Info.plist | 2 +- Sources/MockingbirdFramework/Info.plist | 2 +- .../Utilities/Version.swift | 2 +- Sources/MockingbirdGenerator/Info.plist | 2 +- .../Utilities/Version.swift | 2 +- docs/0.15.0/ArgumentCaptor-1017688/index.html | 181 +++ .../0.15.0/ArgumentMatcher-f013d1a/index.html | 151 ++ docs/0.15.0/CountMatcher-4be5ae3/index.html | 262 ++++ docs/0.15.0/Declaration-f6338ac/index.html | 129 ++ .../FunctionDeclaration-2ccea11/index.html | 119 ++ .../ImplementationProvider-c664b1e/index.html | 91 ++ .../index.html | 91 ++ docs/0.15.0/Mock-28ffcc3/index.html | 146 ++ docs/0.15.0/MockMetadata-36657c4/index.html | 59 + docs/0.15.0/Mockable-9a5a67c/index.html | 59 + docs/0.15.0/MockingContext-c5faed5/index.html | 59 + .../NonEscapingClosure-e61507c/index.html | 85 ++ .../index.html | 210 +++ .../index.html | 103 ++ .../index.html | 103 ++ docs/0.15.0/Providable-7bc5aa7/index.html | 105 ++ docs/0.15.0/SourceLocation-656fd60/index.html | 59 + docs/0.15.0/StaticMock-882efeb/index.html | 146 ++ .../0.15.0/StubbingContext-794fb76/index.html | 59 + .../0.15.0/StubbingManager-761d798/index.html | 238 +++ .../index.html | 118 ++ .../SubscriptDeclaration-38e94f4/index.html | 132 ++ .../index.html | 72 + .../index.html | 103 ++ docs/0.15.0/SwiftSymbol-df7f148/index.html | 181 +++ .../SwiftSymbolParseError-99165a5/index.html | 170 +++ .../SwiftSymbol_Contents-7f818fc/index.html | 84 + .../SwiftSymbol_Kind-a459168/index.html | 1356 +++++++++++++++++ .../SymbolPrintOptions-8c5ff04/index.html | 228 +++ docs/0.15.0/TestFailer-4ae7a4d/index.html | 109 ++ .../index.html | 103 ++ docs/0.15.0/ValueProvider-54037ad/index.html | 550 +++++++ .../VariableDeclaration-c075015/index.html | 132 ++ .../VerificationManager-94d5cc8/index.html | 174 +++ docs/0.15.0/all.css | 1 + docs/0.15.0/any(_:)-da61986/index.html | 103 ++ .../any(_:containing:)-0e18f78/index.html | 110 ++ .../any(_:containing:)-365e26e/index.html | 127 ++ docs/0.15.0/any(_:count:)-860fd11/index.html | 107 ++ docs/0.15.0/any(_:keys:)-e7f89d4/index.html | 126 ++ docs/0.15.0/any(_:of:)-89cb3ec/index.html | 125 ++ docs/0.15.0/any(_:of:)-e376f19/index.html | 111 ++ docs/0.15.0/any(_:where:)-ea2d92e/index.html | 118 ++ .../around(_:tolerance:)-831b19f/index.html | 94 ++ docs/0.15.0/atLeast(_:)-c832002/index.html | 93 ++ docs/0.15.0/atMost(_:)-a2b82d3/index.html | 93 ++ docs/0.15.0/between(_:)-cfca747/index.html | 92 ++ .../index.html | 88 ++ .../clearInvocations(on:)-4120e8f/index.html | 88 ++ .../0.15.0/clearStubs(on:)-f985ed7/index.html | 88 ++ .../eventually(_:_:)-28d4191/index.html | 99 ++ docs/0.15.0/exactly(_:)-47abdfc/index.html | 92 ++ .../finiteSequence(of:)-9390bb3/index.html | 85 ++ .../finiteSequence(of:)-ff3ed8b/index.html | 89 ++ docs/0.15.0/given(_:)-05dd78f/index.html | 96 ++ .../index.html | 117 ++ docs/0.15.0/index.html | 746 +++++++++ .../lastSetValue(initial:)-576c55c/index.html | 73 + .../loopingSequence(of:)-8ab9cb4/index.html | 87 ++ .../loopingSequence(of:)-9da831b/index.html | 90 ++ docs/0.15.0/mock(_:)-b93ee0e/index.html | 94 ++ docs/0.15.0/never-9661ceb/index.html | 54 + docs/0.15.0/not(_:)-3f926b2/index.html | 84 + docs/0.15.0/not(_:)-cf99a2a/index.html | 84 + docs/0.15.0/notEmpty(_:)-3cab350/index.html | 101 ++ docs/0.15.0/notNil(_:)-42278eb/index.html | 101 ++ docs/0.15.0/once-3db83dd/index.html | 54 + .../index.html | 85 ++ .../index.html | 85 ++ docs/0.15.0/reset(_:)-2a0feaf/index.html | 89 ++ docs/0.15.0/sequence(of:)-c40bb93/index.html | 89 ++ docs/0.15.0/sequence(of:)-d9da3e4/index.html | 85 ++ .../swizzleTestFailer(_:)-d923326/index.html | 73 + docs/0.15.0/twice-f36cfd6/index.html | 54 + .../index.html | 115 ++ .../index.html | 122 ++ .../verify(_:file:line:)-a722fba/index.html | 87 ++ docs/index.html | 2 +- docs/latest/index.html | 2 +- 87 files changed, 10581 insertions(+), 14 deletions(-) rename README-0.15.md => README-0.16.md (98%) create mode 100755 docs/0.15.0/ArgumentCaptor-1017688/index.html create mode 100755 docs/0.15.0/ArgumentMatcher-f013d1a/index.html create mode 100755 docs/0.15.0/CountMatcher-4be5ae3/index.html create mode 100755 docs/0.15.0/Declaration-f6338ac/index.html create mode 100755 docs/0.15.0/FunctionDeclaration-2ccea11/index.html create mode 100755 docs/0.15.0/ImplementationProvider-c664b1e/index.html create mode 100755 docs/0.15.0/MKBFail(_:isFatal:file:line:)-c41bd8d/index.html create mode 100755 docs/0.15.0/Mock-28ffcc3/index.html create mode 100755 docs/0.15.0/MockMetadata-36657c4/index.html create mode 100755 docs/0.15.0/Mockable-9a5a67c/index.html create mode 100755 docs/0.15.0/MockingContext-c5faed5/index.html create mode 100755 docs/0.15.0/NonEscapingClosure-e61507c/index.html create mode 100755 docs/0.15.0/OrderedVerificationOptions-77823cc/index.html create mode 100755 docs/0.15.0/PropertyGetterDeclaration-db9ea0d/index.html create mode 100755 docs/0.15.0/PropertySetterDeclaration-7cfb3cc/index.html create mode 100755 docs/0.15.0/Providable-7bc5aa7/index.html create mode 100755 docs/0.15.0/SourceLocation-656fd60/index.html create mode 100755 docs/0.15.0/StaticMock-882efeb/index.html create mode 100755 docs/0.15.0/StubbingContext-794fb76/index.html create mode 100755 docs/0.15.0/StubbingManager-761d798/index.html create mode 100755 docs/0.15.0/StubbingManager_TransitionStrategy-9f44b8f/index.html create mode 100755 docs/0.15.0/SubscriptDeclaration-38e94f4/index.html create mode 100755 docs/0.15.0/SubscriptGetterDeclaration-2324199/index.html create mode 100755 docs/0.15.0/SubscriptSetterDeclaration-a66f358/index.html create mode 100755 docs/0.15.0/SwiftSymbol-df7f148/index.html create mode 100755 docs/0.15.0/SwiftSymbolParseError-99165a5/index.html create mode 100755 docs/0.15.0/SwiftSymbol_Contents-7f818fc/index.html create mode 100755 docs/0.15.0/SwiftSymbol_Kind-a459168/index.html create mode 100755 docs/0.15.0/SymbolPrintOptions-8c5ff04/index.html create mode 100755 docs/0.15.0/TestFailer-4ae7a4d/index.html create mode 100755 docs/0.15.0/ThrowingFunctionDeclaration-9b512dc/index.html create mode 100755 docs/0.15.0/ValueProvider-54037ad/index.html create mode 100755 docs/0.15.0/VariableDeclaration-c075015/index.html create mode 100755 docs/0.15.0/VerificationManager-94d5cc8/index.html create mode 100755 docs/0.15.0/all.css create mode 100755 docs/0.15.0/any(_:)-da61986/index.html create mode 100755 docs/0.15.0/any(_:containing:)-0e18f78/index.html create mode 100755 docs/0.15.0/any(_:containing:)-365e26e/index.html create mode 100755 docs/0.15.0/any(_:count:)-860fd11/index.html create mode 100755 docs/0.15.0/any(_:keys:)-e7f89d4/index.html create mode 100755 docs/0.15.0/any(_:of:)-89cb3ec/index.html create mode 100755 docs/0.15.0/any(_:of:)-e376f19/index.html create mode 100755 docs/0.15.0/any(_:where:)-ea2d92e/index.html create mode 100755 docs/0.15.0/around(_:tolerance:)-831b19f/index.html create mode 100755 docs/0.15.0/atLeast(_:)-c832002/index.html create mode 100755 docs/0.15.0/atMost(_:)-a2b82d3/index.html create mode 100755 docs/0.15.0/between(_:)-cfca747/index.html create mode 100755 docs/0.15.0/clearDefaultValues(on:)-112773d/index.html create mode 100755 docs/0.15.0/clearInvocations(on:)-4120e8f/index.html create mode 100755 docs/0.15.0/clearStubs(on:)-f985ed7/index.html create mode 100755 docs/0.15.0/eventually(_:_:)-28d4191/index.html create mode 100755 docs/0.15.0/exactly(_:)-47abdfc/index.html create mode 100755 docs/0.15.0/finiteSequence(of:)-9390bb3/index.html create mode 100755 docs/0.15.0/finiteSequence(of:)-ff3ed8b/index.html create mode 100755 docs/0.15.0/given(_:)-05dd78f/index.html create mode 100755 docs/0.15.0/inOrder(with:file:line:_:)-3c038cb/index.html create mode 100755 docs/0.15.0/index.html create mode 100755 docs/0.15.0/lastSetValue(initial:)-576c55c/index.html create mode 100755 docs/0.15.0/loopingSequence(of:)-8ab9cb4/index.html create mode 100755 docs/0.15.0/loopingSequence(of:)-9da831b/index.html create mode 100755 docs/0.15.0/mock(_:)-b93ee0e/index.html create mode 100755 docs/0.15.0/never-9661ceb/index.html create mode 100755 docs/0.15.0/not(_:)-3f926b2/index.html create mode 100755 docs/0.15.0/not(_:)-cf99a2a/index.html create mode 100755 docs/0.15.0/notEmpty(_:)-3cab350/index.html create mode 100755 docs/0.15.0/notNil(_:)-42278eb/index.html create mode 100755 docs/0.15.0/once-3db83dd/index.html create mode 100755 docs/0.15.0/parseMangledSwiftSymbol(_:isType:)-3be6b73/index.html create mode 100755 docs/0.15.0/parseMangledSwiftSymbol(_:isType:symbolicReferenceResolver:)-111617a/index.html create mode 100755 docs/0.15.0/reset(_:)-2a0feaf/index.html create mode 100755 docs/0.15.0/sequence(of:)-c40bb93/index.html create mode 100755 docs/0.15.0/sequence(of:)-d9da3e4/index.html create mode 100755 docs/0.15.0/swizzleTestFailer(_:)-d923326/index.html create mode 100755 docs/0.15.0/twice-f36cfd6/index.html create mode 100755 docs/0.15.0/useDefaultValues(from:on:)-5df93fa/index.html create mode 100755 docs/0.15.0/useDefaultValues(from:on:)-7eb6cc5/index.html create mode 100755 docs/0.15.0/verify(_:file:line:)-a722fba/index.html diff --git a/Package.swift b/Package.swift index 15b71282..3a068af9 100644 --- a/Package.swift +++ b/Package.swift @@ -4,7 +4,7 @@ import PackageDescription let package = Package( name: "Mockingbird", platforms: [ - .macOS(.v10_14), + .macOS(.v10_10), .iOS(.v8), .tvOS(.v9), ], diff --git a/README-0.15.md b/README-0.16.md similarity index 98% rename from README-0.15.md rename to README-0.16.md index ee73e3df..a3a109d9 100644 --- a/README-0.15.md +++ b/README-0.16.md @@ -85,7 +85,7 @@ Add the framework to a test target in your `Podfile`, making sure to include the ```ruby target 'MyAppTests' do use_frameworks! - pod 'MockingbirdFramework', '~> 0.14' + pod 'MockingbirdFramework', '~> 0.15' end ``` @@ -116,7 +116,7 @@ Have questions or issues? Add the framework to your `Cartfile`. ``` -github "birdrides/mockingbird" ~> 0.14 +github "birdrides/mockingbird" ~> 0.15 ``` Build the framework with Carthage, [link it to your test target](https://github.com/birdrides/mockingbird/wiki/Linking-Test-Targets), and install the CLI. @@ -152,11 +152,13 @@ Add the framework as a package dependency and link it to your test target.
Click here if you are using a Package.swift manifest file instead. +Add `.package(name: "Mockingbird", …)` and declare `"Mockingbird"` as a dependency of your `.testTarget`. + ```swift let package = Package( name: "MyPackage", dependencies: [ - .package(url: "https://github.com/birdrides/mockingbird.git", .upToNextMinor(from: "0.14.0")), + .package(name: "Mockingbird", url: "https://github.com/birdrides/mockingbird.git", .upToNextMinor(from: "0.15.0")), ], targets: [ .testTarget(name: "MyPackageTests", dependencies: ["Mockingbird"]), diff --git a/README.md b/README.md index a0971ee5..a3a109d9 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Add the framework to a test target in your `Podfile`, making sure to include the ```ruby target 'MyAppTests' do use_frameworks! - pod 'MockingbirdFramework', '~> 0.14' + pod 'MockingbirdFramework', '~> 0.15' end ``` @@ -116,7 +116,7 @@ Have questions or issues? Add the framework to your `Cartfile`. ``` -github "birdrides/mockingbird" ~> 0.14 +github "birdrides/mockingbird" ~> 0.15 ``` Build the framework with Carthage, [link it to your test target](https://github.com/birdrides/mockingbird/wiki/Linking-Test-Targets), and install the CLI. @@ -152,11 +152,13 @@ Add the framework as a package dependency and link it to your test target.
Click here if you are using a Package.swift manifest file instead. +Add `.package(name: "Mockingbird", …)` and declare `"Mockingbird"` as a dependency of your `.testTarget`. + ```swift let package = Package( name: "MyPackage", dependencies: [ - .package(url: "https://github.com/birdrides/mockingbird.git", .upToNextMinor(from: "0.14.0")), + .package(name: "Mockingbird", url: "https://github.com/birdrides/mockingbird.git", .upToNextMinor(from: "0.15.0")), ], targets: [ .testTarget(name: "MyPackageTests", dependencies: ["Mockingbird"]), @@ -573,6 +575,7 @@ Generate mocks for a set of targets in a project. | `--srcroot` | `$SRCROOT` | The folder containing your project’s source files. | | `--outputs` | [`(inferred)`](#--outputs) | List of mock output file paths for each target. | | `--support` | [`(inferred)`](#--support) | The folder containing [supporting source files](https://github.com/birdrides/mockingbird/wiki/Supporting-Source-Files). | +| `--header` | `(none)` | Content to add at the beginning of each generated mock file. | | `--condition` | `(none)` | [Compilation condition](https://docs.swift.org/swift-book/ReferenceManual/Statements.html#ID538) to wrap all generated mocks in, e.g. `DEBUG`. | | `--diagnostics` | `(none)` | List of [diagnostic generator warnings](https://github.com/birdrides/mockingbird/wiki/Diagnostic-Warnings-and-Errors) to enable. | @@ -599,6 +602,7 @@ Configure a test target to use mocks. | `--srcroot` | `/../` | The folder containing your project’s source files. | | `--outputs` | [`(inferred)`](#--outputs) | List of mock output file paths for each target. | | `--support` | [`(inferred)`](#--support) | The folder containing [supporting source files](https://github.com/birdrides/mockingbird/wiki/Supporting-Source-Files). | +| `--header` | `(none)` | Content to add at the beginning of each generated mock file. | | `--condition` | `(none)` | [Compilation condition](https://docs.swift.org/swift-book/ReferenceManual/Statements.html#ID538) to wrap all generated mocks in, e.g. `DEBUG`. | | `--diagnostics` | `(none)` | List of [diagnostic generator warnings](https://github.com/birdrides/mockingbird/wiki/Diagnostic-Warnings-and-Errors) to enable. | | `--loglevel` | `(none)` | The log level to use when generating mocks, `quiet` or `verbose`. | diff --git a/Sources/MockingbirdCli/Info.plist b/Sources/MockingbirdCli/Info.plist index e419fdd1..6e3f1bb2 100644 --- a/Sources/MockingbirdCli/Info.plist +++ b/Sources/MockingbirdCli/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.14.0 + 0.15.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) diff --git a/Sources/MockingbirdFramework/Info.plist b/Sources/MockingbirdFramework/Info.plist index e419fdd1..6e3f1bb2 100644 --- a/Sources/MockingbirdFramework/Info.plist +++ b/Sources/MockingbirdFramework/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.14.0 + 0.15.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) diff --git a/Sources/MockingbirdFramework/Utilities/Version.swift b/Sources/MockingbirdFramework/Utilities/Version.swift index e62b2b73..99225baf 100644 --- a/Sources/MockingbirdFramework/Utilities/Version.swift +++ b/Sources/MockingbirdFramework/Utilities/Version.swift @@ -9,7 +9,7 @@ import Foundation /// Swift Package Manager doesn't create an Info.plist section in the binary like xcodebuild. -let mockingbirdVersion = Version(shortString: "0.14.0") +let mockingbirdVersion = Version(shortString: "0.15.0") struct Version: Comparable, CustomStringConvertible { let semver: [Int] diff --git a/Sources/MockingbirdGenerator/Info.plist b/Sources/MockingbirdGenerator/Info.plist index d0e70e1c..32373714 100644 --- a/Sources/MockingbirdGenerator/Info.plist +++ b/Sources/MockingbirdGenerator/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.14.0 + 0.15.0 CFBundleSignature ???? CFBundleVersion diff --git a/Sources/MockingbirdGenerator/Utilities/Version.swift b/Sources/MockingbirdGenerator/Utilities/Version.swift index 6701f3c6..8d6fb7b3 100644 --- a/Sources/MockingbirdGenerator/Utilities/Version.swift +++ b/Sources/MockingbirdGenerator/Utilities/Version.swift @@ -9,7 +9,7 @@ import Foundation /// Swift Package Manager doesn't create an Info.plist section in the binary like xcodebuild. -public let mockingbirdVersion = Version(shortString: "0.14.0") +public let mockingbirdVersion = Version(shortString: "0.15.0") public struct Version: Comparable, CustomStringConvertible { let semver: [Int] diff --git a/docs/0.15.0/ArgumentCaptor-1017688/index.html b/docs/0.15.0/ArgumentCaptor-1017688/index.html new file mode 100755 index 00000000..fb4eaf8d --- /dev/null +++ b/docs/0.15.0/ArgumentCaptor-1017688/index.html @@ -0,0 +1,181 @@ + + + + + + Mockingbird - ArgumentCaptor + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Argument​Captor +

+ +
public class ArgumentCaptor<ParameterType>: ArgumentMatcher
+
+

Captures method arguments passed during mock invocations.

+ +
+
+

An argument captor extracts received argument values which can be used in other parts of the +test.

+ +
let bird = mock(Bird.self)
+bird.name = "Ryan"
+
+let nameCaptor = ArgumentCaptor<String>()
+verify(bird.setName(nameCaptor.matcher)).wasCalled()
+print(nameCaptor.value)  // Prints "Ryan"
+
+
+
+ +
+ + + + + + +%3 + + +ArgumentCaptor + + +ArgumentCaptor + + + + +ArgumentMatcher + +ArgumentMatcher + + +ArgumentCaptor->ArgumentMatcher + + + + + + + + +
+

Superclass

+
+
ArgumentMatcher
+

Matches argument values with a comparator.

+
+
+
+
+

Initializers

+ +
+

+ init(weak:​) +

+
public init(weak: Bool = false)
+
+

Create a new argument captor.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
weakBool

Whether captured arguments should be stored weakly.

+
+
+
+
+

Properties

+ +
+

+ matcher +

+
var matcher: ParameterType
+
+

Passed as a parameter to mock verification contexts.

+ +
+
+
+

+ all​Values +

+
var allValues: [ParameterType]
+
+

All recorded argument values.

+ +
+
+
+

+ value +

+
var value: ParameterType?
+
+

The last recorded argument value.

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/ArgumentMatcher-f013d1a/index.html b/docs/0.15.0/ArgumentMatcher-f013d1a/index.html new file mode 100755 index 00000000..3ac512a3 --- /dev/null +++ b/docs/0.15.0/ArgumentMatcher-f013d1a/index.html @@ -0,0 +1,151 @@ + + + + + + Mockingbird - ArgumentMatcher + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Argument​Matcher +

+ +
public class ArgumentMatcher: CustomStringConvertible
+
+

Matches argument values with a comparator.

+ +
+
+ +
+ + + + + + +%3 + + +ArgumentMatcher + + +ArgumentMatcher + + + + +CustomStringConvertible + +CustomStringConvertible + + +ArgumentMatcher->CustomStringConvertible + + + + +Equatable + +Equatable + + +ArgumentMatcher->Equatable + + + + +ArgumentCaptor + +ArgumentCaptor + + +ArgumentCaptor->ArgumentMatcher + + + + + + + + +
+

Subclasses

+
+
ArgumentCaptor
+

Captures method arguments passed during mock invocations.

+
+
+

Conforms To

+
+
CustomStringConvertible
+
Equatable
+
+
+
+

Properties

+ +
+

+ description +

+
let description: String
+
+

A description for test failure output.

+ +
+
+
+
+

Methods

+ +
+

+ ==(lhs:​rhs:​) +

+
public static func ==(lhs: ArgumentMatcher, rhs: ArgumentMatcher) -> Bool
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/CountMatcher-4be5ae3/index.html b/docs/0.15.0/CountMatcher-4be5ae3/index.html new file mode 100755 index 00000000..385d63f5 --- /dev/null +++ b/docs/0.15.0/CountMatcher-4be5ae3/index.html @@ -0,0 +1,262 @@ + + + + + + Mockingbird - CountMatcher + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Structure + Count​Matcher +

+ +
public struct CountMatcher
+
+

Checks whether a number matches some expected count.

+ +
+ +
+

Methods

+ +
+

+ or(_:​) +

+
public func or(_ countMatcher: CountMatcher) -> CountMatcher
+
+

Logically combine another count matcher, passing if either matches.

+ +
+
+

Combined count matchers can be used to perform complex checks on the number of invocations +received.

+ +
// Checks that n = 1 || n ≥ 42
+verify(bird.fly()).wasCalled(exactly(once).or(atLeast(42)))
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
count​MatcherCount​Matcher

Another count matcher to combine.

+
+

Returns

+

A combined count matcher.

+ +
+
+

+ or(_:​) +

+
public func or(_ times: Int) -> CountMatcher
+
+

Logically combine with an exact count, passing if either matches.

+ +
+
+

Combined count matchers can be used to perform complex checks on the number of invocations +received.

+ +
// Checks that n = 1 || n = 2
+verify(bird.fly()).wasCalled(exactly(once).or(twice))
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
timesInt

An exact count to combine.

+
+

Returns

+

A combined count matcher.

+ +
+
+

+ and(_:​) +

+
public func and(_ countMatcher: CountMatcher) -> CountMatcher
+
+

Logically combine another count matcher, only passing if both match.

+ +
+
+

Combined count matchers can be used to perform complex checks on the number of invocations +received.

+ +
// Checks that n = 1 && n ≥ 42
+verify(bird.fly()).wasCalled(exactly(once).and(atLeast(42)))
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
count​MatcherCount​Matcher

Another count matcher to combine.

+
+

Returns

+

A combined count matcher.

+ +
+
+

+ xor(_:​) +

+
public func xor(_ countMatcher: CountMatcher) -> CountMatcher
+
+

Logically combine another count matcher, only passing if one matches but not the other.

+ +
+
+

Combined count matchers can be used to perform complex checks on the number of invocations +received.

+ +
// Checks that n ≤ 2 ⊕ n ≥ 1
+verify(bird.fly()).wasCalled(atMost(twice).xor(atLeast(once)))
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
count​MatcherCount​Matcher

Another count matcher to combine.

+
+

Returns

+

A combined count matcher.

+ +
+
+

+ xor(_:​) +

+
public func xor(_ times: Int) -> CountMatcher
+
+

Logically combine an exact count, only passing if one matches but not the other.

+ +
+
+

Combined count matchers can be used to perform complex checks on the number of invocations +received.

+ +
// Checks that n ≥ 1 ⊕ n = 2
+verify(bird.fly()).wasCalled(atLeast(once).xor(twice))
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
timesInt

An exact count.

+
+

Returns

+

A combined count matcher.

+ +
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/Declaration-f6338ac/index.html b/docs/0.15.0/Declaration-f6338ac/index.html new file mode 100755 index 00000000..8608e40a --- /dev/null +++ b/docs/0.15.0/Declaration-f6338ac/index.html @@ -0,0 +1,129 @@ + + + + + + Mockingbird - Declaration + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Protocol + Declaration +

+ +
public protocol Declaration
+
+

All mockable declaration types conform to this protocol.

+ +
+
+ +
+ + + + + + +%3 + + +Declaration + + +Declaration + + + + +SubscriptDeclaration + +SubscriptDeclaration + + +SubscriptDeclaration->Declaration + + + + +FunctionDeclaration + +FunctionDeclaration + + +FunctionDeclaration->Declaration + + + + +VariableDeclaration + +VariableDeclaration + + +VariableDeclaration->Declaration + + + + + + + + +
+

Types Conforming to Declaration

+
+
VariableDeclaration
+

Mockable variable declarations.

+
+
FunctionDeclaration
+

Mockable function declarations.

+
+
SubscriptDeclaration
+

Mockable subscript declarations.

+
+
+
+ + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/FunctionDeclaration-2ccea11/index.html b/docs/0.15.0/FunctionDeclaration-2ccea11/index.html new file mode 100755 index 00000000..417c1dd1 --- /dev/null +++ b/docs/0.15.0/FunctionDeclaration-2ccea11/index.html @@ -0,0 +1,119 @@ + + + + + + Mockingbird - FunctionDeclaration + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Function​Declaration +

+ +
public class FunctionDeclaration: Declaration
+
+

Mockable function declarations.

+ +
+
+ +
+ + + + + + +%3 + + +FunctionDeclaration + + +FunctionDeclaration + + + + +Declaration + +Declaration + + +FunctionDeclaration->Declaration + + + + +ThrowingFunctionDeclaration + +ThrowingFunctionDeclaration + + +ThrowingFunctionDeclaration->FunctionDeclaration + + + + + + + + +
+

Subclasses

+
+
ThrowingFunctionDeclaration
+

Mockable throwing function declarations.

+
+
+

Conforms To

+
+
Declaration
+

All mockable declaration types conform to this protocol.

+
+
+
+ + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/ImplementationProvider-c664b1e/index.html b/docs/0.15.0/ImplementationProvider-c664b1e/index.html new file mode 100755 index 00000000..feceabc9 --- /dev/null +++ b/docs/0.15.0/ImplementationProvider-c664b1e/index.html @@ -0,0 +1,91 @@ + + + + + + Mockingbird - ImplementationProvider + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Structure + Implementation​Provider +

+ +
public struct ImplementationProvider<DeclarationType: Declaration, InvocationType, ReturnType>
+
+

Provides implementation functions used to stub behavior and return values.

+ +
+ +
+

Initializers

+ +
+

+ init(implementation​Creator:​) +

+
public init(implementationCreator: @escaping () -> Any?)
+
+

Create an implementation provider with an optional callback.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
implementation​Creator@escaping () -> Any?

A closure returning an implementation when evaluated.

+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/MKBFail(_:isFatal:file:line:)-c41bd8d/index.html b/docs/0.15.0/MKBFail(_:isFatal:file:line:)-c41bd8d/index.html new file mode 100755 index 00000000..495c6df7 --- /dev/null +++ b/docs/0.15.0/MKBFail(_:isFatal:file:line:)-c41bd8d/index.html @@ -0,0 +1,91 @@ + + + + + + Mockingbird - MKBFail(_:isFatal:file:line:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +MKBFail(_:​is​Fatal:​file:​line:​) +

+ +
public func MKBFail(_ message: String, isFatal: Bool = false, file: StaticString = #file, line: UInt = #line)
+
+

Called by Mockingbird on test assertion failures.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
messageString

A description of the failure.

+
is​FatalBool

If true, test case execution should not continue.

+
fileStatic​String

The file where the failure occurred.

+
lineUInt

The line in the file where the failure occurred.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/Mock-28ffcc3/index.html b/docs/0.15.0/Mock-28ffcc3/index.html new file mode 100755 index 00000000..c62d5aa0 --- /dev/null +++ b/docs/0.15.0/Mock-28ffcc3/index.html @@ -0,0 +1,146 @@ + + + + + + Mockingbird - Mock + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Protocol + Mock +

+ +
public protocol Mock
+
+

All generated mocks conform to this protocol.

+ +
+
+ +
+ + + + + + +%3 + + +Mock + + +Mock + + + + +StaticMock + +StaticMock + + +StaticMock->Mock + + + + + + + + +
+

Types Conforming to Mock

+
+
StaticMock
+

Used to store invocations on static or class scoped methods.

+
+
+
+ + + +
+

Requirements

+ +
+

+ mocking​Context +

+
var mockingContext: MockingContext
+
+

Information about received invocations.

+ +
+
+
+

+ stubbing​Context +

+
var stubbingContext: StubbingContext
+
+

Implementations for stubbing behaviors.

+ +
+
+
+

+ mock​Metadata +

+
var mockMetadata: MockMetadata
+
+

Static metadata about the mock created at generation time.

+ +
+
+
+

+ source​Location +

+
var sourceLocation: SourceLocation?
+
+

Where the mock was initialized.

+ +
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/MockMetadata-36657c4/index.html b/docs/0.15.0/MockMetadata-36657c4/index.html new file mode 100755 index 00000000..6a10f8ac --- /dev/null +++ b/docs/0.15.0/MockMetadata-36657c4/index.html @@ -0,0 +1,59 @@ + + + + + + Mockingbird - MockMetadata + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Structure + Mock​Metadata +

+ +
public struct MockMetadata
+
+

Stores information about generated mocks.

+ +
+ + + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/Mockable-9a5a67c/index.html b/docs/0.15.0/Mockable-9a5a67c/index.html new file mode 100755 index 00000000..4671e3e1 --- /dev/null +++ b/docs/0.15.0/Mockable-9a5a67c/index.html @@ -0,0 +1,59 @@ + + + + + + Mockingbird - Mockable + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Structure + Mockable +

+ +
public struct Mockable<DeclarationType: Declaration, InvocationType, ReturnType>
+
+

Represents a mocked declaration that can be stubbed or verified.

+ +
+ + + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/MockingContext-c5faed5/index.html b/docs/0.15.0/MockingContext-c5faed5/index.html new file mode 100755 index 00000000..12f69eac --- /dev/null +++ b/docs/0.15.0/MockingContext-c5faed5/index.html @@ -0,0 +1,59 @@ + + + + + + Mockingbird - MockingContext + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Mocking​Context +

+ +
public class MockingContext
+
+

Stores invocations received by mocks.

+ +
+ + + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/NonEscapingClosure-e61507c/index.html b/docs/0.15.0/NonEscapingClosure-e61507c/index.html new file mode 100755 index 00000000..b252e311 --- /dev/null +++ b/docs/0.15.0/NonEscapingClosure-e61507c/index.html @@ -0,0 +1,85 @@ + + + + + + Mockingbird - NonEscapingClosure + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Non​Escaping​Closure +

+ +
public class NonEscapingClosure<ClosureType>: NonEscapingType
+
+

Placeholder for non-escaping closure parameter types.

+ +
+
+

Non-escaping closures cannot be stored in an Invocation so an instance of a +NonEscapingClosure is stored instead.

+ +
protocol Bird {
+  func send(_ message: String, callback: (Result) -> Void)
+}
+
+bird.send("Hello", callback: { print($0) })
+
+// Must use a wildcard argument matcher like `any`
+verify(bird.send("Hello", callback: any())).wasCalled()
+
+

Mark closure parameter types as @escaping to capture closures during verification.

+ +
protocol Bird {
+  func send(_ message: String, callback: @escaping (Result) -> Void)
+}
+
+bird.send("Hello", callback: { print($0) })
+
+let argumentCaptor = ArgumentCaptor<(Result) -> Void>()
+verify(bird.send("Hello", callback: argumentCaptor.matcher)).wasCalled()
+argumentCaptor.value?(.success)  // Prints Result.success
+
+
+ + + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/OrderedVerificationOptions-77823cc/index.html b/docs/0.15.0/OrderedVerificationOptions-77823cc/index.html new file mode 100755 index 00000000..3a6fed5f --- /dev/null +++ b/docs/0.15.0/OrderedVerificationOptions-77823cc/index.html @@ -0,0 +1,210 @@ + + + + + + Mockingbird - OrderedVerificationOptions + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Structure + Ordered​Verification​Options +

+ +
public struct OrderedVerificationOptions: OptionSet
+
+

Additional options to increase the strictness of inOrder verification blocks.

+ +
+
+ +
+ + + + + + +%3 + + +OrderedVerificationOptions + + +OrderedVerificationOptions + + + + +OptionSet + +OptionSet + + +OrderedVerificationOptions->OptionSet + + + + + + + + +
+

Conforms To

+
+
OptionSet
+
+
+
+

Initializers

+ +
+

+ init(raw​Value:​) +

+
public init(rawValue: Int)
+
+
+
+

Properties

+ +
+

+ raw​Value +

+
let rawValue: Int
+
+
+

+ no​Invocations​Before +

+
let noInvocationsBefore
+
+

Check that there are no recorded invocations before those explicitly verified in the block.

+ +
+
+

Use this option to disallow invocations prior to those satisfying the first verification.

+ +
bird.eat()
+bird.fly()
+bird.chirp()
+
+// Passes _without_ the option
+inOrder {
+  verify(bird.fly()).wasCalled()
+  verify(bird.chirp()).wasCalled()
+}
+
+// Fails with the option
+inOrder(with: .noInvocationsBefore) {
+  verify(bird.fly()).wasCalled()
+  verify(bird.chirp()).wasCalled()
+}
+
+
+
+
+

+ no​Invocations​After +

+
let noInvocationsAfter
+
+

Check that there are no recorded invocations after those explicitly verified in the block.

+ +
+
+

Use this option to disallow subsequent invocations to those satisfying the last verification.

+ +
bird.fly()
+bird.chirp()
+bird.eat()
+
+// Passes _without_ the option
+inOrder {
+  verify(bird.fly()).wasCalled()
+  verify(bird.chirp()).wasCalled()
+}
+
+// Fails with the option
+inOrder(with: .noInvocationsAfter) {
+  verify(bird.fly()).wasCalled()
+  verify(bird.chirp()).wasCalled()
+}
+
+
+
+
+

+ only​Consecutive​Invocations +

+
let onlyConsecutiveInvocations
+
+

Check that there are no recorded invocations between those explicitly verified in the block.

+ +
+
+

Use this option to disallow non-consecutive invocations to each verification.

+ +
bird.fly()
+bird.eat()
+bird.chirp()
+
+// Passes _without_ the option
+inOrder {
+  verify(bird.fly()).wasCalled()
+  verify(bird.chirp()).wasCalled()
+}
+
+// Fails with the option
+inOrder(with: .noInvocationsAfter) {
+  verify(bird.fly()).wasCalled()
+  verify(bird.chirp()).wasCalled()
+}
+
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/PropertyGetterDeclaration-db9ea0d/index.html b/docs/0.15.0/PropertyGetterDeclaration-db9ea0d/index.html new file mode 100755 index 00000000..98cbc133 --- /dev/null +++ b/docs/0.15.0/PropertyGetterDeclaration-db9ea0d/index.html @@ -0,0 +1,103 @@ + + + + + + Mockingbird - PropertyGetterDeclaration + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Property​Getter​Declaration +

+ +
public class PropertyGetterDeclaration: VariableDeclaration
+
+

Mockable property getter declarations.

+ +
+
+ +
+ + + + + + +%3 + + +PropertyGetterDeclaration + + +PropertyGetterDeclaration + + + + +VariableDeclaration + +VariableDeclaration + + +PropertyGetterDeclaration->VariableDeclaration + + + + + + + + +
+

Superclass

+
+
VariableDeclaration
+

Mockable variable declarations.

+
+
+
+ + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/PropertySetterDeclaration-7cfb3cc/index.html b/docs/0.15.0/PropertySetterDeclaration-7cfb3cc/index.html new file mode 100755 index 00000000..2fbc8ab8 --- /dev/null +++ b/docs/0.15.0/PropertySetterDeclaration-7cfb3cc/index.html @@ -0,0 +1,103 @@ + + + + + + Mockingbird - PropertySetterDeclaration + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Property​Setter​Declaration +

+ +
public class PropertySetterDeclaration: VariableDeclaration
+
+

Mockable property setter declarations.

+ +
+
+ +
+ + + + + + +%3 + + +PropertySetterDeclaration + + +PropertySetterDeclaration + + + + +VariableDeclaration + +VariableDeclaration + + +PropertySetterDeclaration->VariableDeclaration + + + + + + + + +
+

Superclass

+
+
VariableDeclaration
+

Mockable variable declarations.

+
+
+
+ + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/Providable-7bc5aa7/index.html b/docs/0.15.0/Providable-7bc5aa7/index.html new file mode 100755 index 00000000..a03e4a44 --- /dev/null +++ b/docs/0.15.0/Providable-7bc5aa7/index.html @@ -0,0 +1,105 @@ + + + + + + Mockingbird - Providable + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Protocol + Providable +

+ +
public protocol Providable
+
+

A type that can provide concrete instances of itself.

+ +
+
+

Provide wildcard instances for generic types by conforming the base type to Providable and +registering the type. Non-wildcard instances have precedence over wildcard instances.

+ +
extension Array: Providable {
+  public static func createInstance() -> Self? {
+    return Array()
+  }
+}
+
+var valueProvider = ValueProvider()
+valueProvider.registerType(Array<Any>.self)
+
+// All specializations of `Array` return an empty array
+print(valueProvider.provideValue(for: Array<String>.self))  // Prints []
+print(valueProvider.provideValue(for: Array<Data>.self))    // Prints []
+
+// Register a non-wildcard instance of `Array<String>`
+valueProvider.register(["A", "B"], for: Array<String>.self)
+print(valueProvider.provideValue(for: Array<String>.self))  // Prints ["A", "B"]
+print(valueProvider.provideValue(for: Array<Data>.self))    // Prints []
+
+ +
+ + + + +
+

Requirements

+ +
+

+ create​Instance() +

+
static func createInstance() -> Self?
+
+

Create a concrete instance of this type, or nil if no concrete instance is available.

+ +
+
+ +
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/SourceLocation-656fd60/index.html b/docs/0.15.0/SourceLocation-656fd60/index.html new file mode 100755 index 00000000..5414f154 --- /dev/null +++ b/docs/0.15.0/SourceLocation-656fd60/index.html @@ -0,0 +1,59 @@ + + + + + + Mockingbird - SourceLocation + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Structure + Source​Location +

+ +
public struct SourceLocation
+
+

References a line of code in a file.

+ +
+ + + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/StaticMock-882efeb/index.html b/docs/0.15.0/StaticMock-882efeb/index.html new file mode 100755 index 00000000..31e2bc16 --- /dev/null +++ b/docs/0.15.0/StaticMock-882efeb/index.html @@ -0,0 +1,146 @@ + + + + + + Mockingbird - StaticMock + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Static​Mock +

+ +
public class StaticMock: Mock
+
+

Used to store invocations on static or class scoped methods.

+ +
+
+ +
+ + + + + + +%3 + + +StaticMock + + +StaticMock + + + + +Mock + +Mock + + +StaticMock->Mock + + + + + + + + +
+

Conforms To

+
+
Mock
+

All generated mocks conform to this protocol.

+
+
+
+
+

Properties

+ +
+

+ mocking​Context +

+
let mockingContext
+
+

Information about received invocations.

+ +
+
+
+

+ stubbing​Context +

+
let stubbingContext
+
+

Implementations for stubbing behaviors.

+ +
+
+
+

+ mock​Metadata +

+
let mockMetadata
+
+

Static metadata about the mock created at generation time.

+ +
+
+
+

+ source​Location +

+
var sourceLocation: SourceLocation?
+
+

Where the mock was initialized.

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/StubbingContext-794fb76/index.html b/docs/0.15.0/StubbingContext-794fb76/index.html new file mode 100755 index 00000000..9ccac2fd --- /dev/null +++ b/docs/0.15.0/StubbingContext-794fb76/index.html @@ -0,0 +1,59 @@ + + + + + + Mockingbird - StubbingContext + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Stubbing​Context +

+ +
public class StubbingContext
+
+

Stores stubbed implementations used by mocks.

+ +
+ + + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/StubbingManager-761d798/index.html b/docs/0.15.0/StubbingManager-761d798/index.html new file mode 100755 index 00000000..fdb0d48b --- /dev/null +++ b/docs/0.15.0/StubbingManager-761d798/index.html @@ -0,0 +1,238 @@ + + + + + + Mockingbird - StubbingManager + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Stubbing​Manager +

+ +
public class StubbingManager<DeclarationType: Declaration, InvocationType, ReturnType>
+
+

An intermediate object used for stubbing declarations returned by given.

+ +
+
+ + +

Nested Types

+
+
StubbingManager.TransitionStrategy
+

When to use the next chained implementation provider.

+
+
+
+
+

Methods

+ +
+

+ will​Return(_:​) +

+
@discardableResult public func willReturn(_ value: ReturnType) -> Self
+
+

Stub a mocked method or property by returning a single value.

+ +
+
+

Stubbing allows you to define custom behavior for mocks to perform.

+ +
given(bird.doMethod()).willReturn(someValue)
+given(bird.getProperty()).willReturn(someValue)
+
+

Match exact or wildcard argument values when stubbing methods with parameters. Stubs added +later have a higher precedence, so add stubs with specific matchers last.

+ +
given(bird.canChirp(volume: any())).willReturn(true)     // Any volume
+given(bird.canChirp(volume: notNil())).willReturn(true)  // Any non-nil volume
+given(bird.canChirp(volume: 10)).willReturn(true)        // Volume = 10
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
valueReturn​Type

A stubbed value to return.

+
+

Returns

+

The current stubbing manager which can be used to chain additional stubs.

+ +
+
+

+ will​Return(_:​transition:​) +

+
@discardableResult public func willReturn(_ provider: ImplementationProvider<DeclarationType, InvocationType, ReturnType>, transition: TransitionStrategy = .onFirstNil) -> Self
+
+

Stub a mocked method or property with an implementation provider.

+ +
+
+

There are several preset implementation providers such as lastSetValue, which can be used +with property getters to automatically save and return values.

+ +
given(bird.getName()).willReturn(lastSetValue(initial: ""))
+print(bird.name)  // Prints ""
+bird.name = "Ryan"
+print(bird.name)  // Prints "Ryan"
+
+

Implementation providers usually return multiple values, so when using chained stubbing it's +necessary to specify a transition strategy that defines when to go to the next stub.

+ +
given(bird.getName())
+  .willReturn(lastSetValue(initial: ""), transition: .after(2))
+  .willReturn("Sterling")
+
+print(bird.name)  // Prints ""
+bird.name = "Ryan"
+print(bird.name)  // Prints "Ryan"
+print(bird.name)  // Prints "Sterling"
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
providerImplementation​Provider<Declaration​Type, Invocation​Type, Return​Type>

An implementation provider that creates closure implementation stubs.

+
transitionTransition​Strategy

When to use the next implementation provider in the list.

+
+

Returns

+

The current stubbing manager which can be used to chain additional stubs.

+ +
+
+

+ will(_:​) +

+
@discardableResult public func will(_ implementation: InvocationType) -> Self
+
+

Stub a mocked method or property with a closure implementation.

+ +
+
+

Use a closure to implement stubs that contain logic, interact with arguments, or throw errors.

+ +
given(bird.canChirp(volume: any()))
+  .will { volume in
+    return volume < 42
+  }
+
+

Stubs are type safe and work with inout and closure parameter types.

+ +
protocol Bird {
+  func send(_ message: inout String)
+  func fly(callback: (Result) -> Void)
+}
+
+// Inout parameter type
+var message = "Hello!"
+bird.send(&message)
+print(message)   // Prints "HELLO!"
+
+// Closure parameter type
+given(bird.fly(callback: any())).will { callback in
+  callback(.success)
+}
+bird.fly(callback: { result in
+  print(result)  // Prints Result.success
+})
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
implementationInvocation​Type

A closure implementation stub to evaluate.

+
+

Returns

+

The current stubbing manager which can be used to chain additional stubs.

+ +
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/StubbingManager_TransitionStrategy-9f44b8f/index.html b/docs/0.15.0/StubbingManager_TransitionStrategy-9f44b8f/index.html new file mode 100755 index 00000000..dd12baba --- /dev/null +++ b/docs/0.15.0/StubbingManager_TransitionStrategy-9f44b8f/index.html @@ -0,0 +1,118 @@ + + + + + + Mockingbird - StubbingManager.TransitionStrategy + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Enumeration + Stubbing​Manager.​Transition​Strategy +

+ +
public enum TransitionStrategy
+
+

When to use the next chained implementation provider.

+ +
+
+ + +

Member Of

+
+
StubbingManager
+

An intermediate object used for stubbing declarations returned by given.

+
+
+
+
+

Enumeration Cases

+ +
+

+ after +

+
case after(_ times: Int)
+
+

Go to the next provider after providing a certain number of implementations.

+ +
+
+

This transition strategy is particularly useful for non-finite value providers such as +sequence and loopingSequence.

+ +
given(bird.getName())
+  .willReturn(loopingSequence(of: "Ryan", "Sterling"), transition: .after(3))
+  .willReturn("Andrew")
+
+print(bird.name)  // Prints "Ryan"
+print(bird.name)  // Prints "Sterling"
+print(bird.name)  // Prints "Ryan"
+print(bird.name)  // Prints "Andrew"
+
+
+
+
+

+ on​First​Nil +

+
case onFirstNil
+
+

Use the current provider until it provides a nil implementation.

+ +
+
+

This transition strategy should be used for finite value providers like finiteSequence +that are nil terminated to indicate an invalidated state.

+ +
given(bird.getName())
+  .willReturn(finiteSequence(of: "Ryan", "Sterling"), transition: .onFirstNil)
+  .willReturn("Andrew")
+
+print(bird.name)  // Prints "Ryan"
+print(bird.name)  // Prints "Sterling"
+print(bird.name)  // Prints "Andrew"
+
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/SubscriptDeclaration-38e94f4/index.html b/docs/0.15.0/SubscriptDeclaration-38e94f4/index.html new file mode 100755 index 00000000..ea949fae --- /dev/null +++ b/docs/0.15.0/SubscriptDeclaration-38e94f4/index.html @@ -0,0 +1,132 @@ + + + + + + Mockingbird - SubscriptDeclaration + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Subscript​Declaration +

+ +
public class SubscriptDeclaration: Declaration
+
+

Mockable subscript declarations.

+ +
+
+ +
+ + + + + + +%3 + + +SubscriptDeclaration + + +SubscriptDeclaration + + + + +Declaration + +Declaration + + +SubscriptDeclaration->Declaration + + + + +SubscriptSetterDeclaration + +SubscriptSetterDeclaration + + +SubscriptSetterDeclaration->SubscriptDeclaration + + + + +SubscriptGetterDeclaration + +SubscriptGetterDeclaration + + +SubscriptGetterDeclaration->SubscriptDeclaration + + + + + + + + +
+

Subclasses

+
+
SubscriptGetterDeclaration
+

Mockable subscript getter declarations.

+
+
SubscriptSetterDeclaration
+

Mockable subscript setter declarations.

+
+
+

Conforms To

+
+
Declaration
+

All mockable declaration types conform to this protocol.

+
+
+
+ + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/SubscriptGetterDeclaration-2324199/index.html b/docs/0.15.0/SubscriptGetterDeclaration-2324199/index.html new file mode 100755 index 00000000..4084b4d5 --- /dev/null +++ b/docs/0.15.0/SubscriptGetterDeclaration-2324199/index.html @@ -0,0 +1,72 @@ + + + + + + Mockingbird - SubscriptGetterDeclaration + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Subscript​Getter​Declaration +

+ +
public class SubscriptGetterDeclaration: SubscriptDeclaration
+
+

Mockable subscript getter declarations.

+ +
+
+ +
+ + + +
+

Superclass

+
+
SubscriptDeclaration
+

Mockable subscript declarations.

+
+
+
+ + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/SubscriptSetterDeclaration-a66f358/index.html b/docs/0.15.0/SubscriptSetterDeclaration-a66f358/index.html new file mode 100755 index 00000000..79afed47 --- /dev/null +++ b/docs/0.15.0/SubscriptSetterDeclaration-a66f358/index.html @@ -0,0 +1,103 @@ + + + + + + Mockingbird - SubscriptSetterDeclaration + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Subscript​Setter​Declaration +

+ +
public class SubscriptSetterDeclaration: SubscriptDeclaration
+
+

Mockable subscript setter declarations.

+ +
+
+ +
+ + + + + + +%3 + + +SubscriptSetterDeclaration + + +SubscriptSetterDeclaration + + + + +SubscriptDeclaration + +SubscriptDeclaration + + +SubscriptSetterDeclaration->SubscriptDeclaration + + + + + + + + +
+

Superclass

+
+
SubscriptDeclaration
+

Mockable subscript declarations.

+
+
+
+ + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/SwiftSymbol-df7f148/index.html b/docs/0.15.0/SwiftSymbol-df7f148/index.html new file mode 100755 index 00000000..894f3d1b --- /dev/null +++ b/docs/0.15.0/SwiftSymbol-df7f148/index.html @@ -0,0 +1,181 @@ + + + + + + Mockingbird - SwiftSymbol + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Structure + Swift​Symbol +

+ +
public struct SwiftSymbol
+
+ +
+ + + + + + +%3 + + +SwiftSymbol + + +SwiftSymbol + + + + +CustomStringConvertible + +CustomStringConvertible + + +SwiftSymbol->CustomStringConvertible + + + + + + + + +
+

Nested Types

+
+
SwiftSymbol.Contents
+
+
SwiftSymbol.Kind
+
+
+

Conforms To

+
+
CustomStringConvertible
+
+
+
+

Initializers

+ +
+

+ init(kind:​children:​contents:​) +

+
public init(kind: Kind, children: [SwiftSymbol] = [], contents: Contents = .none)
+
+
+
+

Properties

+ +
+

+ description +

+
var description: String
+
+

Overridden method to allow simple printing with default options

+ +
+
+
+

+ kind +

+
let kind: Kind
+
+
+

+ children +

+
var children: [SwiftSymbol]
+
+
+

+ contents +

+
let contents: Contents
+
+
+
+

Methods

+ +
+

+ print(using:​) +

+
public func print(using options: SymbolPrintOptions = .default) -> String
+
+

Prints SwiftSymbols to a String with the full set of printing options.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
optionsSymbol​Print​Options

an option set containing the different DemangleOptions from the Swift project.

+
+

Returns

+

self printed to a string according to the specified options.

+ +
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/SwiftSymbolParseError-99165a5/index.html b/docs/0.15.0/SwiftSymbolParseError-99165a5/index.html new file mode 100755 index 00000000..f45d55ee --- /dev/null +++ b/docs/0.15.0/SwiftSymbolParseError-99165a5/index.html @@ -0,0 +1,170 @@ + + + + + + Mockingbird - SwiftSymbolParseError + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Enumeration + Swift​Symbol​Parse​Error +

+ +
public enum SwiftSymbolParseError
+
+

A type for representing the different possible failure conditions when using ScalarScanner

+ +
+
+ +
+ + + + + + +%3 + + +SwiftSymbolParseError + + +SwiftSymbolParseError + + + + +Error + +Error + + +SwiftSymbolParseError->Error + + + + + + + + +
+

Conforms To

+
+
Error
+
+
+
+

Enumeration Cases

+ +
+

+ utf8Parse​Error +

+
case utf8ParseError
+
+

Attempted to convert the buffer to UnicodeScalars but the buffer contained invalid data

+ +
+
+
+

+ unexpected +

+
case unexpected(at: Int)
+
+

The scalar at the specified index doesn't match the expected grammar

+ +
+
+
+

+ match​Failed +

+
case matchFailed(wanted: String, at: Int)
+
+

Expected wanted at offset at

+ +
+
+
+

+ expected​Int +

+
case expectedInt(at: Int)
+
+

Expected numerals at offset at

+ +
+
+
+

+ ended​Prematurely +

+
case endedPrematurely(count: Int, at: Int)
+
+

Attempted to read count scalars from position at but hit the end of the sequence

+ +
+
+
+

+ search​Failed +

+
case searchFailed(wanted: String, after: Int)
+
+

Unable to find search patter wanted at or after after in the sequence

+ +
+
+
+

+ integer​Overflow +

+
case integerOverflow(at: Int)
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/SwiftSymbol_Contents-7f818fc/index.html b/docs/0.15.0/SwiftSymbol_Contents-7f818fc/index.html new file mode 100755 index 00000000..f8aeef30 --- /dev/null +++ b/docs/0.15.0/SwiftSymbol_Contents-7f818fc/index.html @@ -0,0 +1,84 @@ + + + + + + Mockingbird - SwiftSymbol.Contents + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Enumeration + Swift​Symbol.​Contents +

+ +
public enum Contents
+
+ + +

Member Of

+
+
SwiftSymbol
+
+
+
+
+

Enumeration Cases

+ +
+

+ none +

+
case none
+
+
+

+ index +

+
case index(: UInt64)
+
+
+

+ name +

+
case name(: String)
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/SwiftSymbol_Kind-a459168/index.html b/docs/0.15.0/SwiftSymbol_Kind-a459168/index.html new file mode 100755 index 00000000..85f88bc9 --- /dev/null +++ b/docs/0.15.0/SwiftSymbol_Kind-a459168/index.html @@ -0,0 +1,1356 @@ + + + + + + Mockingbird - SwiftSymbol.Kind + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Enumeration + Swift​Symbol.​Kind +

+ +
public enum Kind
+
+ + +

Member Of

+
+
SwiftSymbol
+
+
+
+
+

Enumeration Cases

+ +
+

+ `class` +

+
case `class`
+
+
+

+ `enum` +

+
case `enum`
+
+
+

+ `extension` +

+
case `extension`
+
+
+

+ `protocol` +

+
case `protocol`
+
+
+

+ protocol​Symbolic​Reference +

+
case protocolSymbolicReference
+
+
+

+ `static` +

+
case `static`
+
+
+

+ `subscript` +

+
case `subscript`
+
+
+

+ allocator +

+
case allocator
+
+
+

+ anonymous​Context +

+
case anonymousContext
+
+
+

+ anonymous​Descriptor +

+
case anonymousDescriptor
+
+
+

+ argument​Tuple +

+
case argumentTuple
+
+
+

+ associated​Conformance​Descriptor +

+
case associatedConformanceDescriptor
+
+
+

+ associated​Type +

+
case associatedType
+
+
+

+ associated​Type​Descriptor +

+
case associatedTypeDescriptor
+
+
+

+ associated​Type​Generic​Param​Ref +

+
case associatedTypeGenericParamRef
+
+
+

+ associated​Type​Metadata​Accessor +

+
case associatedTypeMetadataAccessor
+
+
+

+ associated​Type​Ref +

+
case associatedTypeRef
+
+
+

+ associated​Type​Witness​Table​Accessor +

+
case associatedTypeWitnessTableAccessor
+
+
+

+ assoc​Type​Path +

+
case assocTypePath
+
+
+

+ auto​Closure​Type +

+
case autoClosureType
+
+
+

+ bound​Generic​Class +

+
case boundGenericClass
+
+
+

+ bound​Generic​Enum +

+
case boundGenericEnum
+
+
+

+ bound​Generic​Function +

+
case boundGenericFunction
+
+
+

+ bound​Generic​Other​Nominal​Type +

+
case boundGenericOtherNominalType
+
+
+

+ bound​Generic​Protocol +

+
case boundGenericProtocol
+
+
+

+ bound​Generic​Structure +

+
case boundGenericStructure
+
+
+

+ bound​Generic​Type​Alias +

+
case boundGenericTypeAlias
+
+
+

+ builtin​Type​Name +

+
case builtinTypeName
+
+
+

+ cFunction​Pointer +

+
case cFunctionPointer
+
+
+

+ class​Metadata​Base​Offset +

+
case classMetadataBaseOffset
+
+
+

+ constructor +

+
case constructor
+
+
+

+ coroutine​Continuation​Prototype +

+
case coroutineContinuationPrototype
+
+
+

+ curry​Thunk +

+
case curryThunk
+
+
+

+ deallocator +

+
case deallocator
+
+
+

+ decl​Context +

+
case declContext
+
+
+

+ default​Argument​Initializer +

+
case defaultArgumentInitializer
+
+
+

+ default​Associated​Conformance​Accessor +

+
case defaultAssociatedConformanceAccessor
+
+
+

+ default​Associated​Type​Metadata​Accessor +

+
case defaultAssociatedTypeMetadataAccessor
+
+
+

+ dependent​Associated​Type​Ref +

+
case dependentAssociatedTypeRef
+
+
+

+ dependent​Generic​Conformance​Requirement +

+
case dependentGenericConformanceRequirement
+
+
+

+ dependent​Generic​Layout​Requirement +

+
case dependentGenericLayoutRequirement
+
+
+

+ dependent​Generic​Param​Count +

+
case dependentGenericParamCount
+
+
+

+ dependent​Generic​Param​Type +

+
case dependentGenericParamType
+
+
+

+ dependent​Generic​Same​Type​Requirement +

+
case dependentGenericSameTypeRequirement
+
+
+

+ dependent​Generic​Signature +

+
case dependentGenericSignature
+
+
+

+ dependent​Generic​Type +

+
case dependentGenericType
+
+
+

+ dependent​Member​Type +

+
case dependentMemberType
+
+
+

+ dependent​Pseudogeneric​Signature +

+
case dependentPseudogenericSignature
+
+
+

+ destructor +

+
case destructor
+
+
+

+ did​Set +

+
case didSet
+
+
+

+ direct​Method​Reference​Attribute +

+
case directMethodReferenceAttribute
+
+
+

+ directness +

+
case directness
+
+
+

+ dispatch​Thunk +

+
case dispatchThunk
+
+
+

+ dynamic​Attribute +

+
case dynamicAttribute
+
+
+

+ dynamic​Self +

+
case dynamicSelf
+
+
+

+ empty​List +

+
case emptyList
+
+
+

+ enum​Case +

+
case enumCase
+
+
+

+ error​Type +

+
case errorType
+
+
+

+ escaping​Auto​Closure​Type +

+
case escapingAutoClosureType
+
+
+

+ existential​Metatype +

+
case existentialMetatype
+
+
+

+ explicit​Closure +

+
case explicitClosure
+
+
+

+ extension​Descriptor +

+
case extensionDescriptor
+
+
+

+ field​Offset +

+
case fieldOffset
+
+
+

+ first​Element​Marker +

+
case firstElementMarker
+
+
+

+ full​Type​Metadata +

+
case fullTypeMetadata
+
+
+

+ function +

+
case function
+
+
+

+ function​Signature​Specialization +

+
case functionSignatureSpecialization
+
+
+

+ function​Signature​Specialization​Param +

+
case functionSignatureSpecializationParam
+
+
+

+ function​Signature​Specialization​Param​Kind +

+
case functionSignatureSpecializationParamKind
+
+
+

+ function​Signature​Specialization​Param​Payload +

+
case functionSignatureSpecializationParamPayload
+
+
+

+ function​Type +

+
case functionType
+
+
+

+ generic​Partial​Specialization +

+
case genericPartialSpecialization
+
+
+

+ generic​Partial​Specialization​Not​ReAbstracted +

+
case genericPartialSpecializationNotReAbstracted
+
+
+

+ generic​Protocol​Witness​Table +

+
case genericProtocolWitnessTable
+
+
+

+ generic​Protocol​Witness​Table​Instantiation​Function +

+
case genericProtocolWitnessTableInstantiationFunction
+
+
+

+ generic​Specialization +

+
case genericSpecialization
+
+
+

+ generic​Specialization​Not​ReAbstracted +

+
case genericSpecializationNotReAbstracted
+
+
+

+ generic​Specialization​Param +

+
case genericSpecializationParam
+
+
+

+ generic​Type​Metadata​Pattern +

+
case genericTypeMetadataPattern
+
+
+

+ generic​Type​Param​Decl +

+
case genericTypeParamDecl
+
+
+

+ getter +

+
case getter
+
+
+

+ global +

+
case global
+
+
+

+ global​Getter +

+
case globalGetter
+
+
+

+ identifier +

+
case identifier
+
+
+

+ impl​Convention +

+
case implConvention
+
+
+

+ impl​Error​Result +

+
case implErrorResult
+
+
+

+ impl​Escaping +

+
case implEscaping
+
+
+

+ impl​Function​Attribute +

+
case implFunctionAttribute
+
+
+

+ impl​Function​Type +

+
case implFunctionType
+
+
+

+ implicit​Closure +

+
case implicitClosure
+
+
+

+ impl​Parameter +

+
case implParameter
+
+
+

+ impl​Result +

+
case implResult
+
+
+

+ index +

+
case index
+
+
+

+ infix​Operator +

+
case infixOperator
+
+
+

+ initializer +

+
case initializer
+
+
+

+ inlined​Generic​Function +

+
case inlinedGenericFunction
+
+
+

+ in​Out +

+
case inOut
+
+
+

+ is​Serialized +

+
case isSerialized
+
+
+

+ iVar​Destroyer +

+
case iVarDestroyer
+
+
+

+ iVar​Initializer +

+
case iVarInitializer
+
+
+

+ key​Path​Equals​Thunk​Helper +

+
case keyPathEqualsThunkHelper
+
+
+

+ key​Path​Getter​Thunk​Helper +

+
case keyPathGetterThunkHelper
+
+
+

+ key​Path​Hash​Thunk​Helper +

+
case keyPathHashThunkHelper
+
+
+

+ key​Path​Setter​Thunk​Helper +

+
case keyPathSetterThunkHelper
+
+
+

+ label​List +

+
case labelList
+
+
+

+ lazy​Protocol​Witness​Table​Accessor +

+
case lazyProtocolWitnessTableAccessor
+
+
+

+ lazy​Protocol​Witness​Table​Cache​Variable +

+
case lazyProtocolWitnessTableCacheVariable
+
+
+

+ local​Decl​Name +

+
case localDeclName
+
+
+

+ materialize​For​Set +

+
case materializeForSet
+
+
+

+ merged​Function +

+
case mergedFunction
+
+
+

+ metaclass +

+
case metaclass
+
+
+

+ metatype +

+
case metatype
+
+
+

+ metatype​Representation +

+
case metatypeRepresentation
+
+
+

+ method​Descriptor +

+
case methodDescriptor
+
+
+

+ method​Lookup​Function +

+
case methodLookupFunction
+
+
+

+ modify​Accessor +

+
case modifyAccessor
+
+
+

+ module +

+
case module
+
+
+

+ module​Descriptor +

+
case moduleDescriptor
+
+
+

+ native​Owning​Addressor +

+
case nativeOwningAddressor
+
+
+

+ native​Owning​Mutable​Addressor +

+
case nativeOwningMutableAddressor
+
+
+

+ native​Pinning​Addressor +

+
case nativePinningAddressor
+
+
+

+ native​Pinning​Mutable​Addressor +

+
case nativePinningMutableAddressor
+
+
+

+ no​Escape​Function​Type +

+
case noEscapeFunctionType
+
+
+

+ nominal​Type​Descriptor +

+
case nominalTypeDescriptor
+
+
+

+ non​Obj​CAttribute +

+
case nonObjCAttribute
+
+
+

+ number +

+
case number
+
+
+

+ obj​CAttribute +

+
case objCAttribute
+
+
+

+ obj​CBlock +

+
case objCBlock
+
+
+

+ other​Nominal​Type +

+
case otherNominalType
+
+
+

+ outlined​Assign​With​Copy +

+
case outlinedAssignWithCopy
+
+
+

+ outlined​Assign​With​Take +

+
case outlinedAssignWithTake
+
+
+

+ outlined​Bridged​Method +

+
case outlinedBridgedMethod
+
+
+

+ outlined​Consume +

+
case outlinedConsume
+
+
+

+ outlined​Copy +

+
case outlinedCopy
+
+
+

+ outlined​Destroy +

+
case outlinedDestroy
+
+
+

+ outlined​Initialize​With​Copy +

+
case outlinedInitializeWithCopy
+
+
+

+ outlined​Initialize​With​Take +

+
case outlinedInitializeWithTake
+
+
+

+ outlined​Release +

+
case outlinedRelease
+
+
+

+ outlined​Retain +

+
case outlinedRetain
+
+
+

+ outlined​Variable +

+
case outlinedVariable
+
+
+

+ owned +

+
case owned
+
+
+

+ owning​Addressor +

+
case owningAddressor
+
+
+

+ owning​Mutable​Addressor +

+
case owningMutableAddressor
+
+
+

+ partial​Apply​Forwarder +

+
case partialApplyForwarder
+
+
+

+ partial​Apply​Obj​CForwarder +

+
case partialApplyObjCForwarder
+
+
+

+ postfix​Operator +

+
case postfixOperator
+
+
+

+ prefix​Operator +

+
case prefixOperator
+
+
+

+ private​Decl​Name +

+
case privateDeclName
+
+
+

+ property​Descriptor +

+
case propertyDescriptor
+
+
+

+ protocol​Conformance +

+
case protocolConformance
+
+
+

+ protocol​Conformance​Descriptor +

+
case protocolConformanceDescriptor
+
+
+

+ protocol​Descriptor +

+
case protocolDescriptor
+
+
+

+ protocol​List +

+
case protocolList
+
+
+

+ protocol​List​With​Any​Object +

+
case protocolListWithAnyObject
+
+
+

+ protocol​List​With​Class +

+
case protocolListWithClass
+
+
+

+ protocol​Requirements​Base​Descriptor +

+
case protocolRequirementsBaseDescriptor
+
+
+

+ protocol​Witness +

+
case protocolWitness
+
+
+

+ protocol​Witness​Table +

+
case protocolWitnessTable
+
+
+

+ protocol​Witness​Table​Accessor +

+
case protocolWitnessTableAccessor
+
+
+

+ protocol​Witness​Table​Pattern +

+
case protocolWitnessTablePattern
+
+
+

+ reabstraction​Thunk +

+
case reabstractionThunk
+
+
+

+ reabstraction​Thunk​Helper +

+
case reabstractionThunkHelper
+
+
+

+ read​Accessor +

+
case readAccessor
+
+
+

+ reflection​Metadata​Assoc​Type​Descriptor +

+
case reflectionMetadataAssocTypeDescriptor
+
+
+

+ reflection​Metadata​Builtin​Descriptor +

+
case reflectionMetadataBuiltinDescriptor
+
+
+

+ reflection​Metadata​Field​Descriptor +

+
case reflectionMetadataFieldDescriptor
+
+
+

+ reflection​Metadata​Superclass​Descriptor +

+
case reflectionMetadataSuperclassDescriptor
+
+
+

+ related​Entity​Decl​Name +

+
case relatedEntityDeclName
+
+
+

+ resilient​Protocol​Witness​Table +

+
case resilientProtocolWitnessTable
+
+
+

+ retroactive​Conformance +

+
case retroactiveConformance
+
+
+

+ return​Type +

+
case returnType
+
+
+

+ setter +

+
case setter
+
+
+

+ shared +

+
case shared
+
+
+

+ sil​Box​Immutable​Field +

+
case silBoxImmutableField
+
+
+

+ sil​Box​Layout +

+
case silBoxLayout
+
+
+

+ sil​Box​Mutable​Field +

+
case silBoxMutableField
+
+
+

+ sil​Box​Type +

+
case silBoxType
+
+
+

+ sil​Box​Type​With​Layout +

+
case silBoxTypeWithLayout
+
+
+

+ specialization​Pass​ID +

+
case specializationPassID
+
+
+

+ structure +

+
case structure
+
+
+

+ suffix +

+
case suffix
+
+
+

+ sugared​Optional +

+
case sugaredOptional
+
+
+

+ sugared​Array +

+
case sugaredArray
+
+
+

+ sugared​Dictionary +

+
case sugaredDictionary
+
+
+

+ sugared​Paren +

+
case sugaredParen
+
+
+

+ type​Symbolic​Reference +

+
case typeSymbolicReference
+
+
+

+ thin​Function​Type +

+
case thinFunctionType
+
+
+

+ throws​Annotation +

+
case throwsAnnotation
+
+
+

+ tuple +

+
case tuple
+
+
+

+ tuple​Element +

+
case tupleElement
+
+
+

+ tuple​Element​Name +

+
case tupleElementName
+
+
+

+ type +

+
case type
+
+
+

+ type​Alias +

+
case typeAlias
+
+
+

+ type​List +

+
case typeList
+
+
+

+ type​Mangling +

+
case typeMangling
+
+
+

+ type​Metadata +

+
case typeMetadata
+
+
+

+ type​Metadata​Access​Function +

+
case typeMetadataAccessFunction
+
+
+

+ type​Metadata​Completion​Function +

+
case typeMetadataCompletionFunction
+
+
+

+ type​Metadata​Instantiation​Cache +

+
case typeMetadataInstantiationCache
+
+
+

+ type​Metadata​Instantiation​Function +

+
case typeMetadataInstantiationFunction
+
+
+

+ type​Metadata​Lazy​Cache +

+
case typeMetadataLazyCache
+
+
+

+ type​Metadata​Singleton​Initialization​Cache +

+
case typeMetadataSingletonInitializationCache
+
+
+

+ uncurried​Function​Type +

+
case uncurriedFunctionType
+
+
+

+ unmanaged +

+
case unmanaged
+
+
+

+ unowned +

+
case unowned
+
+
+

+ unsafe​Addressor +

+
case unsafeAddressor
+
+
+

+ unsafe​Mutable​Addressor +

+
case unsafeMutableAddressor
+
+
+

+ value​Witness +

+
case valueWitness
+
+
+

+ value​Witness​Table +

+
case valueWitnessTable
+
+
+

+ variable +

+
case variable
+
+
+

+ variadic​Marker +

+
case variadicMarker
+
+
+

+ vTable​Attribute +

+
case vTableAttribute
+
+
+

+ vTable​Thunk +

+
case vTableThunk
+
+
+

+ weak +

+
case weak
+
+
+

+ will​Set +

+
case willSet
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/SymbolPrintOptions-8c5ff04/index.html b/docs/0.15.0/SymbolPrintOptions-8c5ff04/index.html new file mode 100755 index 00000000..5d6f41d4 --- /dev/null +++ b/docs/0.15.0/SymbolPrintOptions-8c5ff04/index.html @@ -0,0 +1,228 @@ + + + + + + Mockingbird - SymbolPrintOptions + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Structure + Symbol​Print​Options +

+ +
public struct SymbolPrintOptions: OptionSet
+
+

These options mimic those used in the Swift project. Check that project for details.

+ +
+
+ +
+ + + + + + +%3 + + +SymbolPrintOptions + + +SymbolPrintOptions + + + + +OptionSet + +OptionSet + + +SymbolPrintOptions->OptionSet + + + + + + + + +
+

Conforms To

+
+
OptionSet
+
+
+
+

Initializers

+ +
+

+ init(raw​Value:​) +

+
public init(rawValue: Int)
+
+
+
+

Properties

+ +
+

+ raw​Value +

+
let rawValue: Int
+
+
+

+ synthesize​Sugar​OnTypes +

+
let synthesizeSugarOnTypes
+
+
+

+ display​Debugger​Generated​Module +

+
let displayDebuggerGeneratedModule
+
+
+

+ qualify​Entities +

+
let qualifyEntities
+
+
+

+ display​Extension​Contexts +

+
let displayExtensionContexts
+
+
+

+ display​Unmangled​Suffix +

+
let displayUnmangledSuffix
+
+
+

+ display​Module​Names +

+
let displayModuleNames
+
+
+

+ display​Generic​Specializations +

+
let displayGenericSpecializations
+
+
+

+ display​Protocol​Conformances +

+
let displayProtocolConformances
+
+
+

+ display​Where​Clauses +

+
let displayWhereClauses
+
+
+

+ display​Entity​Types +

+
let displayEntityTypes
+
+
+

+ shorten​Partial​Apply +

+
let shortenPartialApply
+
+
+

+ shorten​Thunk +

+
let shortenThunk
+
+
+

+ shorten​Value​Witness +

+
let shortenValueWitness
+
+
+

+ shorten​Archetype +

+
let shortenArchetype
+
+
+

+ show​Private​Discriminators +

+
let showPrivateDiscriminators
+
+
+

+ show​Function​Argument​Types +

+
let showFunctionArgumentTypes
+
+
+

+ `default` +

+
let `default`: SymbolPrintOptions
+
+
+

+ simplified +

+
let simplified: SymbolPrintOptions
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/TestFailer-4ae7a4d/index.html b/docs/0.15.0/TestFailer-4ae7a4d/index.html new file mode 100755 index 00000000..d3091d54 --- /dev/null +++ b/docs/0.15.0/TestFailer-4ae7a4d/index.html @@ -0,0 +1,109 @@ + + + + + + Mockingbird - TestFailer + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Protocol + Test​Failer +

+ +
public protocol TestFailer
+
+

A type that can handle test failures emitted by Mockingbird.

+ +
+ + + + +
+

Requirements

+ +
+

+ fail(message:​is​Fatal:​file:​line:​) +

+
func fail(message: String, isFatal: Bool, file: StaticString, line: UInt)
+
+

Fail the current test case.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
messageString

A description of the failure.

+
is​FatalBool

If true, test case execution should not continue.

+
fileStatic​String

The file where the failure occurred.

+
lineUInt

The line in the file where the failure occurred.

+
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/ThrowingFunctionDeclaration-9b512dc/index.html b/docs/0.15.0/ThrowingFunctionDeclaration-9b512dc/index.html new file mode 100755 index 00000000..b67b9d26 --- /dev/null +++ b/docs/0.15.0/ThrowingFunctionDeclaration-9b512dc/index.html @@ -0,0 +1,103 @@ + + + + + + Mockingbird - ThrowingFunctionDeclaration + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Throwing​Function​Declaration +

+ +
public class ThrowingFunctionDeclaration: FunctionDeclaration
+
+

Mockable throwing function declarations.

+ +
+
+ +
+ + + + + + +%3 + + +ThrowingFunctionDeclaration + + +ThrowingFunctionDeclaration + + + + +FunctionDeclaration + +FunctionDeclaration + + +ThrowingFunctionDeclaration->FunctionDeclaration + + + + + + + + +
+

Superclass

+
+
FunctionDeclaration
+

Mockable function declarations.

+
+
+
+ + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/ValueProvider-54037ad/index.html b/docs/0.15.0/ValueProvider-54037ad/index.html new file mode 100755 index 00000000..6dff514e --- /dev/null +++ b/docs/0.15.0/ValueProvider-54037ad/index.html @@ -0,0 +1,550 @@ + + + + + + Mockingbird - ValueProvider + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Structure + Value​Provider +

+ +
public struct ValueProvider
+
+

Provides concrete instances of types.

+ +
+
+

To return default values for unstubbed methods, use a ValueProvider with the initialized mock. +Mockingbird provides preset value providers which are guaranteed to be backwards compatible, +such as .standardProvider.

+ +
let bird = mock(Bird.self)
+bird.useDefaultValues(from: .standardProvider)
+print(bird.name)  // Prints ""
+
+

You can create custom value providers by registering values for types.

+ +
var valueProvider = ValueProvider()
+valueProvider.register("Ryan", for: String.self)
+
+bird.useDefaultValues(from: valueProvider)
+print(bird.name)  // Prints "Ryan"
+
+
+ +
+

Initializers

+ +
+

+ init() +

+
public init()
+
+

Create an empty value provider.

+ +
+
+
+
+

Properties

+ +
+

+ collections​Provider +

+
let collectionsProvider
+
+

A value provider with default-initialized collections.

+ +
+
+

https://developer.apple.com/documentation/foundation/collections

+ +
+
+
+

+ primitives​Provider +

+
let primitivesProvider
+
+

A value provider with primitive Swift types.

+ +
+
+

https://developer.apple.com/documentation/foundation/numbers_data_and_basic_values

+ +
+
+
+

+ basics​Provider +

+
let basicsProvider
+
+

A value provider with basic number and data types that are not primitives.

+ +
+
+

https://developer.apple.com/documentation/foundation/numbers_data_and_basic_values

+ +
+
+
+

+ strings​Provider +

+
let stringsProvider
+
+

A value provider with string and text types.

+ +
+
+

https://developer.apple.com/documentation/foundation/strings_and_text

+ +
+
+
+

+ dates​Provider +

+
let datesProvider
+
+

A value provider with date and time types.

+ +
+
+

https://developer.apple.com/documentation/foundation/dates_and_times

+ +
+
+
+

+ standard​Provider +

+
let standardProvider
+
+

All preset value providers.

+ +
+
+
+
+

Methods

+ +
+

+ add(_:​) +

+
mutating public func add(_ other: Self)
+
+

Adds the values from another value provider.

+ +
+
+

Value providers can be composed by adding values from another provider. Values in the other +provider have precedence and will overwrite existing values in this provider.

+ +
var valueProvider = ValueProvider()
+valueProvider.add(.standardProvider)
+print(valueProvider.provideValue(for: String.self))  // Prints ""
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
otherSelf

A value provider to combine.

+
+
+
+

+ adding(_:​) +

+
public func adding(_ other: Self) -> Self
+
+

Returns a new value provider containing the values from both providers.

+ +
+
+

Value providers can be composed by adding values from another provider. Values in the added +provider have precendence over those in base provider.

+ +
let valueProvider = ValueProvider.collectionsProvider.adding(.primitivesProvider)
+print(valueProvider.provideValue(for: [Bool].self))  // Prints []
+print(valueProvider.provideValue(for: Int.self))     // Prints 0
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
otherSelf

A value provider to combine.

+
+

Returns

+

A new value provider with the values of lhs and rhs.

+ +
+
+

+ +(lhs:​rhs:​) +

+
static public func +(lhs: Self, rhs: Self) -> Self
+
+

Returns a new value provider containing the values from both providers.

+ +
+
+

Value providers can be composed by adding values from other providers. Values in the second +provider have precendence over those in first provider.

+ +
let valueProvider = .collectionsProvider + .primitivesProvider
+print(valueProvider.provideValue(for: [Bool].self))  // Prints []
+print(valueProvider.provideValue(for: Int.self))     // Prints 0
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
lhsSelf

A value provider.

+
rhsSelf

A value provider.

+
+

Returns

+

A new value provider with the values of lhs and rhs.

+ +
+
+

+ register(_:​for:​) +

+
mutating public func register<K, V>(_ value: V, for type: K.Type)
+
+

Register a value for a specific type.

+ +
+
+

Create custom value providers by registering values for types.

+ +
var valueProvider = ValueProvider()
+valueProvider.register("Ryan", for: String.self)
+print(valueProvider.provideValue(for: String.self))  // Prints "Ryan"
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
valueV

The value to register.

+
typeK.​Type

The type to register the value under. value must be of kind type.

+
+
+
+

+ register​Type(_:​) +

+
mutating public func registerType<T: Providable>(_ type: T.Type = T.self)
+
+

Register a Providable type used to provide values for generic types.

+ +
+
+

Provide wildcard instances for generic types by conforming the base type to Providable and +registering the type. Non-wildcard instances have precedence over wildcard instances.

+ +
extension Array: Providable {
+  public static func createInstance() -> Self? {
+    return Array()
+  }
+}
+
+var valueProvider = ValueProvider()
+valueProvider.registerType(Array<Any>.self)
+
+// All specializations of `Array` return an empty array
+print(valueProvider.provideValue(for: Array<String>.self))  // Prints []
+print(valueProvider.provideValue(for: Array<Data>.self))    // Prints []
+
+// Register a non-wildcard instance of `Array<String>`
+valueProvider.register(["A", "B"], for: Array<String>.self)
+print(valueProvider.provideValue(for: Array<String>.self))  // Prints ["A", "B"]
+print(valueProvider.provideValue(for: Array<Data>.self))    // Prints []
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
typeT.​Type

A Providable type to register.

+
+
+
+

+ remove(_:​) +

+
mutating public func remove<T>(_ type: T.Type)
+
+

Remove a registered value for a given type.

+ +
+
+

Previously registered values can be removed from the top-level value provider. This does not +affect values provided by subproviders.

+ +
var valueProvider = ValueProvider(from: .standardProvider)
+print(valueProvider.provideValue(for: String.self))  // Prints ""
+
+// Override the subprovider value
+valueProvider.register("Ryan", for: String.self)
+print(valueProvider.provideValue(for: String.self))  // Prints "Ryan"
+
+// Remove the registered value
+valueProvider.remove(String.self)
+print(valueProvider.provideValue(for: String.self))  // Prints ""
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
typeT.​Type

The type to remove a previously registered value for.

+
+
+
+

+ remove(_:​) +

+
mutating public func remove<T: Providable>(_ type: T.Type = T.self)
+
+

Remove a registered Providable type.

+ +
+
+

Previously registered wildcard instances for generic types can be removed from the top-level +value provider.

+ +
var valueProvider = ValueProvider()
+
+valueProvider.registerType(Array<Any>.self)
+print(valueProvider.provideValue(for: Array<String>.self))  // Prints []
+
+valueProvider.remove(Array<Any>.self)
+print(valueProvider.provideValue(for: Array<String>.self))  // Prints nil
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
typeT.​Type

A Providable type to remove.

+
+
+
+

+ provide​Value(for:​) +

+
public func provideValue<T>(for type: T.Type = T.self) -> T?
+
+

Provide a value for a given type.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
typeT.​Type

A type to provide a value for.

+
+

Returns

+

A concrete instance of the given type, or nil if no value could be provided.

+ +
+
+

+ provide​Value(for:​) +

+
public func provideValue<T: Providable>(for type: T.Type = T.self) -> T?
+
+

Provide a value a given Providable type.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
typeT.​Type

A Providable type to provide a value for.

+
+

Returns

+

A concrete instance of the given type, or nil if no value could be provided.

+ +
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/VariableDeclaration-c075015/index.html b/docs/0.15.0/VariableDeclaration-c075015/index.html new file mode 100755 index 00000000..f75ae4d6 --- /dev/null +++ b/docs/0.15.0/VariableDeclaration-c075015/index.html @@ -0,0 +1,132 @@ + + + + + + Mockingbird - VariableDeclaration + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Class + Variable​Declaration +

+ +
public class VariableDeclaration: Declaration
+
+

Mockable variable declarations.

+ +
+
+ +
+ + + + + + +%3 + + +VariableDeclaration + + +VariableDeclaration + + + + +Declaration + +Declaration + + +VariableDeclaration->Declaration + + + + +PropertyGetterDeclaration + +PropertyGetterDeclaration + + +PropertyGetterDeclaration->VariableDeclaration + + + + +PropertySetterDeclaration + +PropertySetterDeclaration + + +PropertySetterDeclaration->VariableDeclaration + + + + + + + + +
+

Subclasses

+
+
PropertyGetterDeclaration
+

Mockable property getter declarations.

+
+
PropertySetterDeclaration
+

Mockable property setter declarations.

+
+
+

Conforms To

+
+
Declaration
+

All mockable declaration types conform to this protocol.

+
+
+
+ + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/VerificationManager-94d5cc8/index.html b/docs/0.15.0/VerificationManager-94d5cc8/index.html new file mode 100755 index 00000000..42d01be4 --- /dev/null +++ b/docs/0.15.0/VerificationManager-94d5cc8/index.html @@ -0,0 +1,174 @@ + + + + + + Mockingbird - VerificationManager + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+ Structure + Verification​Manager +

+ +
public struct VerificationManager<InvocationType, ReturnType>
+
+

An intermediate object used for verifying declarations returned by verify.

+ +
+ +
+

Methods

+ +
+

+ was​Called(_:​) +

+
public func wasCalled(_ countMatcher: CountMatcher)
+
+

Verify that the mock received the invocation some number of times using a count matcher.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
count​MatcherCount​Matcher

A count matcher defining the number of invocations to verify.

+
+
+
+

+ was​Called(_:​) +

+
public func wasCalled(_ times: Int = once)
+
+

Verify that the mock received the invocation an exact number of times.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
timesInt

The exact number of invocations expected.

+
+
+
+

+ was​Never​Called() +

+
public func wasNeverCalled()
+
+

Verify that the mock never received the invocation.

+ +
+
+
+

+ returning(_:​) +

+
public func returning(_ type: ReturnType.Type = ReturnType.self) -> Self
+
+

Disambiguate methods overloaded by return type.

+ +
+
+

Declarations for methods overloaded by return type cannot type inference and should be +disambiguated.

+ +
protocol Bird {
+  func getMessage<T>() throws -> T    // Overloaded generically
+  func getMessage() throws -> String  // Overloaded explicitly
+  func getMessage() throws -> Data
+}
+
+verify(bird.send(any()))
+  .returning(String.self)
+  .wasCalled()
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
typeReturn​Type.​Type

The return type of the declaration to verify.

+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/all.css b/docs/0.15.0/all.css new file mode 100755 index 00000000..68137abd --- /dev/null +++ b/docs/0.15.0/all.css @@ -0,0 +1 @@ +:root{--system-red:#ff3b30;--system-orange:#ff9500;--system-yellow:#fc0;--system-green:#34c759;--system-teal:#5ac8fa;--system-blue:#007aff;--system-indigo:#5856d6;--system-purple:#af52de;--system-pink:#ff2d55;--system-gray:#8e8e93;--system-gray2:#aeaeb2;--system-gray3:#c7c7cc;--system-gray4:#d1d1d6;--system-gray5:#e5e5ea;--system-gray6:#f2f2f7;--label:#000;--secondary-label:#3c3c43;--tertiary-label:#48484a;--quaternary-label:#636366;--placeholder-text:#8e8e93;--link:#007aff;--separator:#e5e5ea;--opaque-separator:#c6c6c8;--system-fill:#787880;--secondary-system-fill:#787880;--tertiary-system-fill:#767680;--quaternary-system-fill:#747480;--system-background:#fff;--secondary-system-background:#f2f2f7;--tertiary-system-background:#fff;--secondary-system-grouped-background:#fff;--tertiary-system-grouped-background:#f2f2f7}@supports (color:color(display-p3 1 1 1)){:root{--system-red:color(display-p3 1 0.2314 0.1882);--system-orange:color(display-p3 1 0.5843 0);--system-yellow:color(display-p3 1 0.8 0);--system-green:color(display-p3 0.2039 0.7804 0.349);--system-teal:color(display-p3 0.3529 0.7843 0.9804);--system-blue:color(display-p3 0 0.4784 1);--system-indigo:color(display-p3 0.3451 0.3373 0.8392);--system-purple:color(display-p3 0.6863 0.3216 0.8706);--system-pink:color(display-p3 1 0.1765 0.3333);--system-gray:color(display-p3 0.5569 0.5569 0.5765);--system-gray2:color(display-p3 0.6824 0.6824 0.698);--system-gray3:color(display-p3 0.7804 0.7804 0.8);--system-gray4:color(display-p3 0.8196 0.8196 0.8392);--system-gray5:color(display-p3 0.898 0.898 0.9176);--system-gray6:color(display-p3 0.949 0.949 0.9686);--label:color(display-p3 0 0 0);--secondary-label:color(display-p3 0.2353 0.2353 0.2627);--tertiary-label:color(display-p3 0.2823 0.2823 0.2901);--quaternary-label:color(display-p3 0.4627 0.4627 0.5019);--placeholder-text:color(display-p3 0.5568 0.5568 0.5764);--link:color(display-p3 0 0.4784 1);--separator:color(display-p3 0.898 0.898 0.9176);--opaque-separator:color(display-p3 0.7765 0.7765 0.7843);--system-fill:color(display-p3 0.4706 0.4706 0.502);--secondary-system-fill:color(display-p3 0.4706 0.4706 0.502);--tertiary-system-fill:color(display-p3 0.4627 0.4627 0.502);--quaternary-system-fill:color(display-p3 0.4549 0.4549 0.502);--system-background:color(display-p3 1 1 1);--secondary-system-background:color(display-p3 0.949 0.949 0.9686);--tertiary-system-background:color(display-p3 1 1 1);--secondary-system-grouped-background:color(display-p3 1 1 1);--tertiary-system-grouped-background:color(display-p3 0.949 0.949 0.9686)}}:root{--large-title:600 32pt/39pt sans-serif;--title-1:600 26pt/32pt sans-serif;--title-2:600 20pt/25pt sans-serif;--title-3:500 18pt/23pt sans-serif;--headline:500 15pt/20pt sans-serif;--body:300 15pt/20pt sans-serif;--callout:300 14pt/19pt sans-serif;--subhead:300 13pt/18pt sans-serif;--footnote:300 12pt/16pt sans-serif;--caption-1:300 11pt/13pt sans-serif;--caption-2:300 11pt/13pt sans-serif}@media screen and (max-width:768px){:root{--large-title:600 27.2pt/33.15pt sans-serif;--title-1:600 22.1pt/27.2pt sans-serif;--title-2:600 17pt/21.25pt sans-serif;--title-3:500 15.3pt/19.55pt sans-serif;--headline:500 12.75pt/17pt sans-serif;--body:300 12.75pt/17pt sans-serif;--callout:300 11.9pt/16.15pt sans-serif;--subhead:300 11.05pt/15.3pt sans-serif;--footnote:300 10.2pt/13.6pt sans-serif;--caption-1:300 9.35pt/11.05pt sans-serif;--caption-2:300 9.35pt/11.05pt sans-serif}}:root{--icon-case:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='%2389c5e6' height='90' rx='8' stroke='%236bb7e1' stroke-miterlimit='10' stroke-width='4' width='90' x='5' y='5'/%3E%3Cpath d='M20.21 50c0-20.7 11.9-32.79 30.8-32.79 16 0 28.21 10.33 28.7 25.32H64.19C63.4 35 58.09 30.11 51 30.11c-8.79 0-14.37 7.52-14.37 19.82s5.54 20 14.41 20c7.08 0 12.22-4.66 13.23-12.09h15.52c-.74 15.07-12.43 25-28.78 25C32 82.81 20.21 70.72 20.21 50z' fill='%23fff'/%3E%3C/svg%3E");--icon-class:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='%239b98e6' height='90' rx='8' stroke='%235856d6' stroke-miterlimit='10' stroke-width='4' width='90' x='5' y='5'/%3E%3Cpath d='m20.21 50c0-20.7 11.9-32.79 30.8-32.79 16 0 28.21 10.33 28.7 25.32h-15.52c-.79-7.53-6.1-12.42-13.19-12.42-8.79 0-14.37 7.52-14.37 19.82s5.54 20 14.41 20c7.08 0 12.22-4.66 13.23-12.09h15.52c-.74 15.07-12.43 25-28.78 25-19.01-.03-30.8-12.12-30.8-32.84z' fill='%23fff'/%3E%3C/svg%3E");--icon-enumeration:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='%23eca95b' height='90' rx='8' stroke='%23e89234' stroke-miterlimit='10' stroke-width='4' width='90' x='5.17' y='5'/%3E%3Cpath d='M71.9 81.71H28.43V18.29H71.9v13H44.56v12.62h25.71v11.87H44.56V68.7H71.9z' fill='%23fff'/%3E%3C/svg%3E");--icon-extension:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='%23eca95b' height='90' rx='8' stroke='%23e89234' stroke-miterlimit='10' stroke-width='4' width='90' x='5' y='5'/%3E%3Cg fill='%23fff'%3E%3Cpath d='M54.43 81.93H20.51V18.07h33.92v12.26H32.61v13.8h20.45v11.32H32.61v14.22h21.82zM68.74 74.58h-.27l-2.78 7.35h-7.28L64 69.32l-6-12.54h8l2.74 7.3h.27l2.76-7.3h7.64l-6.14 12.54 5.89 12.61h-7.64z'/%3E%3C/g%3E%3C/svg%3E");--icon-function:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='%237ac673' height='90' rx='8' stroke='%235bb74f' stroke-miterlimit='10' stroke-width='4' width='90' x='5' y='5'/%3E%3Cpath d='M24.25 75.66A5.47 5.47 0 0130 69.93c1.55 0 3.55.41 6.46.41 3.19 0 4.78-1.55 5.46-6.65l1.5-10.14h-9.34a6 6 0 110-12h11.1l1.09-7.27C47.82 23.39 54.28 17.7 64 17.7c6.69 0 11.74 1.77 11.74 6.64A5.47 5.47 0 0170 30.07c-1.55 0-3.55-.41-6.46-.41-3.14 0-4.73 1.51-5.46 6.65l-.78 5.27h11.44a6 6 0 11.05 12H55.6l-1.78 12.11C52.23 76.61 45.72 82.3 36 82.3c-6.7 0-11.75-1.77-11.75-6.64z' fill='%23fff'/%3E%3C/svg%3E");--icon-method:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='%235a98f8' height='90' rx='8' stroke='%232974ed' stroke-miterlimit='10' stroke-width='4' width='90' x='5' y='5'/%3E%3Cpath d='M70.61 81.71v-39.6h-.31l-15.69 39.6h-9.22l-15.65-39.6h-.35v39.6H15.2V18.29h18.63l16 41.44h.36l16-41.44H84.8v63.42z' fill='%23fff'/%3E%3C/svg%3E");--icon-property:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='%2389c5e6' height='90' rx='8' stroke='%236bb7e1' stroke-miterlimit='10' stroke-width='4' width='90' x='5' y='5'/%3E%3Cpath d='M52.31 18.29c13.62 0 22.85 8.84 22.85 22.46s-9.71 22.37-23.82 22.37H41v18.59H24.84V18.29zM41 51h7c6.85 0 10.89-3.56 10.89-10.2S54.81 30.64 48 30.64h-7z' fill='%23fff'/%3E%3C/svg%3E");--icon-protocol:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='%23ff6682' height='90' rx='8' stroke='%23ff2d55' stroke-miterlimit='10' stroke-width='4' width='90' x='5' y='5'/%3E%3Cg fill='%23fff'%3E%3Cpath d='M46.28 18.29c11.84 0 20 8.66 20 21.71s-8.44 21.71-20.6 21.71H34.87v20H22.78V18.29zM34.87 51.34H43c6.93 0 11-4 11-11.29S50 28.8 43.07 28.8h-8.2zM62 57.45h8v4.77h.16c.84-3.45 2.54-5.12 5.17-5.12a5.06 5.06 0 011.92.35V65a5.69 5.69 0 00-2.39-.51c-3.08 0-4.66 1.74-4.66 5.12v12.1H62z'/%3E%3C/g%3E%3C/svg%3E");--icon-structure:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='%23b57edf' height='90' rx='8' stroke='%239454c2' stroke-miterlimit='10' stroke-width='4' width='90' x='5' y='5'/%3E%3Cpath d='M38.38 63c.74 4.53 5.62 7.16 11.82 7.16s10.37-2.81 10.37-6.68c0-3.51-2.73-5.31-10.24-6.76l-6.5-1.23C31.17 53.14 24.62 47 24.62 37.28c0-12.22 10.59-20.09 25.18-20.09 16 0 25.36 7.83 25.53 19.91h-15c-.26-4.57-4.57-7.29-10.42-7.29s-9.31 2.63-9.31 6.37c0 3.34 2.9 5.18 9.8 6.5l6.5 1.23C70.46 46.51 76.61 52 76.61 62c0 12.74-10 20.83-26.72 20.83-15.82 0-26.28-7.3-26.5-19.78z' fill='%23fff'/%3E%3C/svg%3E");--icon-typealias:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='%237ac673' height='90' rx='8' stroke='%235bb74f' stroke-miterlimit='10' stroke-width='4' width='90' x='5' y='5'/%3E%3Cpath d='M42 81.71V31.3H24.47v-13h51.06v13H58v50.41z' fill='%23fff'/%3E%3C/svg%3E");--icon-variable:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='%237ac673' height='90' rx='8' stroke='%235bb74f' stroke-miterlimit='10' stroke-width='4' width='90' x='5' y='5'/%3E%3Cpath d='M39.85 81.71L19.63 18.29H38l12.18 47.64h.35L62.7 18.29h17.67L60.15 81.71z' fill='%23fff'/%3E%3C/svg%3E")}body,button,input,select,textarea{-moz-font-feature-settings:"kern";-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;direction:ltr;font-synthesis:none;text-align:left}h1:first-of-type,h2:first-of-type,h3:first-of-type,h4:first-of-type,h5:first-of-type,h6:first-of-type{margin-top:0}h1 code,h2 code,h3 code,h4 code,h5 code,h6 code{font-family:inherit;font-weight:inherit}h1 img,h2 img,h3 img,h4 img,h5 img,h6 img{margin:0 .5em .2em 0;vertical-align:middle;display:inline-block}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:.8em}img+h1{margin-top:.5em}img+h1,img+h2,img+h3,img+h4,img+h5,img+h6{margin-top:.3em}:is(h1,h2,h3,h4,h5,h6)+:is(h1,h2,h3,h4,h5,h6){margin-top:.4em}:matches(h1,h2,h3,h4,h5,h6)+:matches(h1,h2,h3,h4,h5,h6){margin-top:.4em}:is(p,ul,ol)+:is(h1,h2,h3,h4,h5,h6){margin-top:1.6em}:matches(p,ul,ol)+:matches(h1,h2,h3,h4,h5,h6){margin-top:1.6em}:is(p,ul,ol)+*{margin-top:.8em}:matches(p,ul,ol)+*{margin-top:.8em}ol,ul{margin-left:1.17647em}:matches(ul,ol) :matches(ul,ol){margin-bottom:0;margin-top:0}nav h2{color:#3c3c43;color:var(--secondary-label);font-size:1rem;font-feature-settings:"c2sc";font-variant:small-caps;font-weight:600;text-transform:uppercase}nav ol,nav ul{margin:0;list-style:none}nav li li{font-size:smaller}a:link,a:visited{text-decoration:none}a:hover{text-decoration:underline}a:active{text-decoration:none}b,strong{font-weight:600}.discussion,.summary{font:300 14pt/19pt sans-serif;font:var(--callout)}article>.discussion{margin-bottom:2em}.discussion .highlight{padding:1em;text-indent:0}cite,dfn,em,i{font-style:italic}:matches(h1,h2,h3) sup{font-size:.4em}sup a{color:inherit;vertical-align:inherit}sup a:hover{color:#007aff;color:var(--link);text-decoration:none}sub{line-height:1}abbr{border:0}:lang(ja),:lang(ko),:lang(th),:lang(zh){font-style:normal}:lang(ko){word-break:keep-all}form fieldset{margin:1em auto;max-width:450px;width:95%}form label{display:block;font-size:1em;font-weight:400;line-height:1.5em;margin-bottom:14px;position:relative;width:100%}input[type=email],input[type=number],input[type=password],input[type=tel],input[type=text],input[type=url],textarea{border-radius:4px;border:1px solid #e5e5ea;border:1px solid var(--separator);color:#333;font-family:inherit;font-size:100%;font-weight:400;height:34px;margin:0;padding:0 1em;position:relative;vertical-align:top;width:100%;z-index:1}input[type=email],input [type=email]:focus,input[type=number],input [type=number]:focus,input[type=password],input [type=password]:focus,input[type=tel],input [type=tel]:focus,input[type=text],input [type=text]:focus,input[type=url],input [type=url]:focus,textarea,textarea:focus{-webkit-appearance:none;-moz-appearance:none;appearance:none}input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,textarea:focus{border-color:#08c;box-shadow:0 0 0 3px rgba(0,136,204,.3);outline:0;z-index:9}input[type=email]:-moz-read-only,input[type=number]:-moz-read-only,input[type=password]:-moz-read-only,input[type=tel]:-moz-read-only,input[type=text]:-moz-read-only,input[type=url]:-moz-read-only,textarea:-moz-read-only{background:none;border:none;box-shadow:none;padding-left:0}input[type=email]:read-only,input[type=number]:read-only,input[type=password]:read-only,input[type=tel]:read-only,input[type=text]:read-only,input[type=url]:read-only,textarea:read-only{background:none;border:none;box-shadow:none;padding-left:0}::-webkit-input-placeholder{color:#8e8e93;color:var(--placeholder-text)}::-moz-placeholder{color:#8e8e93;color:var(--placeholder-text)}:-ms-input-placeholder{color:#8e8e93;color:var(--placeholder-text)}::-ms-input-placeholder{color:#8e8e93;color:var(--placeholder-text)}::placeholder{color:#8e8e93;color:var(--placeholder-text)}textarea{-webkit-overflow-scrolling:touch;line-height:1.4737;min-height:134px;overflow-y:auto;resize:vertical;transform:translateZ(0)}textarea,textarea:focus{-webkit-appearance:none;-moz-appearance:none;appearance:none}select{background:transparent;border-radius:4px;border:none;cursor:pointer;font-family:inherit;font-size:1em;height:34px;margin:0;padding:0 1em;width:100%}select,select:focus{-webkit-appearance:none;-moz-appearance:none;appearance:none}select:focus{border-color:#08c;box-shadow:0 0 0 3px rgba(0,136,204,.3);outline:0;z-index:9}input[type=file]{background:#fafafa;border-radius:4px;color:#333;cursor:pointer;font-family:inherit;font-size:100%;height:34px;margin:0;padding:6px 1em;position:relative;vertical-align:top;width:100%;z-index:1}input[type=file]:focus{border-color:#08c;outline:0;box-shadow:0 0 0 3px rgba(0,136,204,.3);z-index:9}button,button:focus,input[type=file]:focus,input[type=file]:focus:focus,input[type=reset],input[type=reset]:focus,input[type=submit],input[type=submit]:focus{-webkit-appearance:none;-moz-appearance:none;appearance:none}:matches(button,input[type=reset],input[type=submit]){background-color:#e3e3e3;background:linear-gradient(#fff,#e3e3e3);border-color:#d6d6d6;color:#0070c9}:matches(button,input[type=reset],input[type=submit]):hover{background-color:#eee;background:linear-gradient(#fff,#eee);border-color:#d9d9d9}:matches(button,input[type=reset],input[type=submit]):active{background-color:#dcdcdc;background:linear-gradient(#f7f7f7,#dcdcdc);border-color:#d0d0d0}:matches(button,input[type=reset],input[type=submit]):disabled{background-color:#e3e3e3;background:linear-gradient(#fff,#e3e3e3);border-color:#d6d6d6;color:#0070c9}body{background:var(--system-grouped-background);color:#000;color:var(--label);font-family:ui-system,-apple-system,BlinkMacSystemFont,sans-serif;font:300 15pt/20pt sans-serif;font:var(--body)}h1{font:600 32pt/39pt sans-serif;font:var(--large-title)}h2{font:600 20pt/25pt sans-serif;font:var(--title-2)}h3{font:500 18pt/23pt sans-serif;font:var(--title-3)}[role=article]>h3,h4,h5,h6{font:500 15pt/20pt sans-serif;font:var(--headline)}.summary+h4,.summary+h5,.summary+h6{margin-top:2em;margin-bottom:0}a{color:#007aff;color:var(--link)}label{font:300 14pt/19pt sans-serif;font:var(--callout)}input,label{display:block}input{margin-bottom:1em}hr{border:none;border-top:1px solid #e5e5ea;border-top:1px solid var(--separator);margin:1em 0}table{width:100%;font:300 11pt/13pt sans-serif;font:var(--caption-1);caption-side:bottom;margin-bottom:2em}td,th{padding:0 1em}th{font-weight:600;text-align:left}thead th{border-bottom:1px solid #e5e5ea;border-bottom:1px solid var(--separator)}tr:last-of-type td,tr:last-of-type th{border-bottom:none}td,th{border-bottom:1px solid #e5e5ea;border-bottom:1px solid var(--separator);color:#3c3c43;color:var(--secondary-label)}caption{color:#48484a;color:var(--tertiary-label);font:300 11pt/13pt sans-serif;font:var(--caption-2);margin-top:2em;text-align:left}.graph text,[role=article]>h3,code,dl dt[class],nav li[class]{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-weight:300}.graph>polygon{display:none}.graph text{fill:currentColor!important}.graph ellipse,.graph path,.graph polygon,.graph rect{stroke:currentColor!important}body{width:90vw;max-width:1280px;margin:1em auto}body>header{font:600 26pt/32pt sans-serif;font:var(--title-1);padding:.5em 0}body>header a{color:#000;color:var(--label)}body>header span{font-weight:400}body>header sup{text-transform:uppercase;font-size:small;font-weight:300;letter-spacing:.1ch}body>footer,body>header sup{color:#3c3c43;color:var(--secondary-label)}body>footer{clear:both;padding:1em 0;font:300 11pt/13pt sans-serif;font:var(--caption-1)}@media screen and (max-width:768px){body>nav{display:none}}main,nav{overflow-x:auto}main{background:#fff;background:var(--system-background);border-radius:8px;padding:0}main section{border-bottom:1px solid #e5e5ea;border-bottom:1px solid var(--separator);margin-bottom:2em;padding-bottom:1em}main section:last-of-type{border-bottom:none;margin-bottom:0}nav{float:right;margin-left:1em;max-height:100vh;overflow:auto;padding:0 1em 3em;position:-webkit-sticky;position:sticky;top:1em;width:20vw}nav a{color:#3c3c43;color:var(--secondary-label)}nav ul a{color:#48484a;color:var(--tertiary-label)}nav ol,nav ul{padding:0}nav ul{font:300 14pt/19pt sans-serif;font:var(--callout);margin-bottom:1em}nav ol>li>a{display:block;font-size:smaller;font:500 15pt/20pt sans-serif;font:var(--headline);margin:.5em 0}nav li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}blockquote{--link:var(--secondary-label);border-left:4px solid #e5e5ea;border-left:4px solid var(--separator);color:#3c3c43;color:var(--secondary-label);font-size:smaller;margin-left:0;padding-left:2em}blockquote a{text-decoration:underline}article{padding:2em 0 1em}article>.summary{border-bottom:1px solid #e5e5ea;border-bottom:1px solid var(--separator);margin-bottom:2em;padding-bottom:1em}article>.summary:last-child{border-bottom:none}.parameters th{text-align:right}.parameters td{color:#3c3c43;color:var(--secondary-label)}.parameters th+td{text-align:center}dl{display:inline-block;margin-top:0}dt{font:500 15pt/20pt sans-serif;font:var(--headline)}dd{margin-left:2em;margin-bottom:1em}dd p{margin-top:0}.highlight{background:#f2f2f7;background:var(--secondary-system-background);border-radius:8px;font-size:smaller;margin-bottom:2em;overflow-x:auto;padding:1em 1em 1em 3em;text-indent:-2em}.highlight .p{white-space:nowrap}.highlight .placeholder{color:#000;color:var(--label)}.highlight a{text-decoration:underline;color:#8e8e93;color:var(--placeholder-text)}.highlight .attribute,.highlight .keyword,.highlight .literal{color:#af52de;color:var(--system-purple)}.highlight .number{color:#007aff;color:var(--system-blue)}.highlight .declaration{color:#5ac8fa;color:var(--system-teal)}.highlight .type{color:#5856d6;color:var(--system-indigo)}.highlight .directive{color:#ff9500;color:var(--system-orange)}.highlight .comment{color:#8e8e93;color:var(--system-gray)}main summary:hover{text-decoration:underline}figure{margin:2em 0;padding:1em 0}figure svg{max-width:100%;height:auto!important;margin:0 auto;display:block}@media screen and (max-width:768px){#relationships figure{display:none}}h1 small{font-size:.5em;line-height:1.5;display:block;font-weight:400;color:#636366;color:var(--quaternary-label)}dd code,li code,p code{font-size:smaller;color:#3c3c43;color:var(--secondary-label)}a code{text-decoration:underline}dl dt[class],nav li[class],section>[role=article][class]{background-image:var(--background-image);background-size:1em;background-repeat:no-repeat;background-position:left .125em}nav li[class]{background-position:left .25em}section>[role=article]{margin-bottom:1em;padding-bottom:1em;border-bottom:1px solid #e5e5ea;border-bottom:1px solid var(--separator);padding-left:2em}section>[role=article]:last-of-type{margin-bottom:0;padding-bottom:0;border-bottom:none}dl dt[class],nav li[class]{list-style:none;text-indent:2em;margin-bottom:.5em}nav li[class]{text-indent:1.5em;margin-bottom:1em}.case,.enumeration_case{--background-image:var(--icon-case);--link:var(--system-teal)}.class{--background-image:var(--icon-class);--link:var(--system-indigo)}.enumeration{--background-image:var(--icon-enumeration)}.enumeration,.extension{--link:var(--system-orange)}.extension{--background-image:var(--icon-extension)}.function{--background-image:var(--icon-function);--link:var(--system-green)}.initializer,.method{--background-image:var(--icon-method);--link:var(--system-blue)}.property{--background-image:var(--icon-property);--link:var(--system-teal)}.protocol{--background-image:var(--icon-protocol);--link:var(--system-pink)}.structure{--background-image:var(--icon-structure);--link:var(--system-purple)}.typealias{--background-image:var(--icon-typealias)}.typealias,.variable{--link:var(--system-green)}.variable{--background-image:var(--icon-variable)}.unknown{--link:var(--quaternary-label);color:#007aff;color:var(--link)} \ No newline at end of file diff --git a/docs/0.15.0/any(_:)-da61986/index.html b/docs/0.15.0/any(_:)-da61986/index.html new file mode 100755 index 00000000..3ca54130 --- /dev/null +++ b/docs/0.15.0/any(_:)-da61986/index.html @@ -0,0 +1,103 @@ + + + + + + Mockingbird - any(_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +any(_:​) +

+ +
public func any<T>(_ type: T.Type = T.self) -> T
+
+

Matches all argument values.

+ +
+
+

Argument matching allows you to stub or verify specific invocations of parameterized methods. +Use the wildcard argument matcher any as a type safe placeholder for matching any argument +value.

+ +
given(bird.canChirp(volume: any())).willReturn(true)
+given(bird.setName(any())).will { print($0) }
+
+print(bird.canChirp(volume: 10))  // Prints "true"
+bird.name = "Ryan"  // Prints "Ryan"
+
+verify(bird.canChirp(volume: any())).wasCalled()
+verify(bird.setName(any())).wasCalled()
+
+

Methods overloaded by parameter type can be disambiguated by explicitly specifying the type.

+ +
protocol Bird {
+  func send<T>(_ message: T)    // Overloaded generically
+  func send(_ message: String)  // Overloaded explicitly
+  func send(_ message: Data)
+}
+
+given(bird.send(any(String.self))).will { print($0) }
+
+bird.send("Hello")  // Prints "Hello"
+
+verify(bird.send(any(String.self))).wasCalled()
+verify(bird.send(any(Data.self))).wasNeverCalled()
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
typeT.​Type

The parameter type used to disambiguate overloaded methods.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/any(_:containing:)-0e18f78/index.html b/docs/0.15.0/any(_:containing:)-0e18f78/index.html new file mode 100755 index 00000000..b0734117 --- /dev/null +++ b/docs/0.15.0/any(_:containing:)-0e18f78/index.html @@ -0,0 +1,110 @@ + + + + + + Mockingbird - any(_:containing:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +any(_:​containing:​) +

+ +
public func any<T: Collection>(_ type: T.Type = T.self, containing values: T.Element) -> T
+
+

Matches any collection containing all of the values.

+ +
+
+

Argument matching allows you to stub or verify specific invocations of parameterized methods. +Use the argument matcher any(containing:) to match collections that contain all specified +values.

+ +
protocol Bird {
+  func send(_ messages: [String])
+}
+
+given(bird.send(any(containing: "Hi", "Hello")))
+  .will { print($0) }
+
+bird.send(["Hi", "Hello"])  // Prints ["Hi", "Hello"]
+bird.send(["Hi", "Bye"])    // Error: Missing stubbed implementation
+bird.send(["Bye"])          // Error: Missing stubbed implementation
+
+

Methods overloaded by parameter type can be disambiguated by explicitly specifying the type.

+ +
protocol Bird {
+  func send<T>(_ messages: [T])    // Overloaded generically
+  func send(_ messages: [String])  // Overloaded explicitly
+  func send(_ messages: [Data])
+}
+
+given(bird.send(any([String].self, containing: ["Hi", "Hello"])))
+  .will { print($0) }
+
+bird.send(["Hi", "Hello"])       // Prints ["Hi", "Hello"]
+bird.send([Data([1]), Data(2)])  // Error: Missing stubbed implementation
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
typeT.​Type

The parameter type used to disambiguate overloaded methods.

+
valuesT.​Element

A set of values that must all exist in the collection to match.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/any(_:containing:)-365e26e/index.html b/docs/0.15.0/any(_:containing:)-365e26e/index.html new file mode 100755 index 00000000..4219985c --- /dev/null +++ b/docs/0.15.0/any(_:containing:)-365e26e/index.html @@ -0,0 +1,127 @@ + + + + + + Mockingbird - any(_:containing:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +any(_:​containing:​) +

+ +
public func any<K, V>(_ type: Dictionary<K, V>.Type = Dictionary<K, V>.self, containing values: V) -> Dictionary<K, V>
+
+

Matches any dictionary containing all of the values.

+ +
+
+

Argument matching allows you to stub or verify specific invocations of parameterized methods. +Use the argument matcher any(containing:) to match dictionaries that contain all specified +values.

+ +
protocol Bird {
+  func send(_ messages: [UUID: String])
+}
+
+given(bird.send(any(containing: "Hi", "Hello")))
+  .will { print($0) }
+
+bird.send([
+  UUID(): "Hi",
+  UUID(): "Hello",
+])  // Prints ["Hi", "Hello"]
+
+bird.send([
+  UUID(): "Hi",
+  UUID(): "Bye",
+])  // Error: Missing stubbed implementation
+
+bird.send([
+  UUID(): "Bye",
+]) // Error: Missing stubbed implementation
+
+

Methods overloaded by parameter type can be disambiguated by explicitly specifying the type.

+ +
protocol Bird {
+  func send<T>(_ messages: [UUID: T])    // Overloaded generically
+  func send(_ messages: [UUID: String])  // Overloaded explicitly
+  func send(_ messages: [UUID: Data])
+}
+
+given(bird.send(any([UUID: String].self, containing: "Hi", "Hello")))
+  .will { print($0) }
+
+bird.send([
+  UUID(): "Hi",
+  UUID(): "Hello",
+])  // Prints ["Hi", "Hello"]
+
+bird.send([
+  UUID(): Data([1]),
+  UUID(): Data([2]),
+])  // Error: Missing stubbed implementation
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
typeDictionary<K, V>.​Type

The parameter type used to disambiguate overloaded methods.

+
valuesV

A set of values that must all exist in the dictionary to match.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/any(_:count:)-860fd11/index.html b/docs/0.15.0/any(_:count:)-860fd11/index.html new file mode 100755 index 00000000..e926cdba --- /dev/null +++ b/docs/0.15.0/any(_:count:)-860fd11/index.html @@ -0,0 +1,107 @@ + + + + + + Mockingbird - any(_:count:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +any(_:​count:​) +

+ +
public func any<T: Collection>(_ type: T.Type = T.self, count countMatcher: CountMatcher) -> T
+
+

Matches any collection with a specific number of elements.

+ +
+
+

Argument matching allows you to stub or verify specific invocations of parameterized methods. +Use the argument matcher any(count:) to match collections with a specific number of elements.

+ +
protocol Bird {
+  func send(_ messages: [String])
+}
+
+given(bird.send(any(count: 2))).will { print($0) }
+
+bird.send(["Hi", "Hello"])  // Prints ["Hi", "Hello"]
+bird.send(["Hi"])           // Error: Missing stubbed implementation
+
+

Methods overloaded by parameter type can be disambiguated by explicitly specifying the type.

+ +
protocol Bird {
+  func send<T>(_ messages: [T])    // Overloaded generically
+  func send(_ messages: [String])  // Overloaded explicitly
+  func send(_ messages: [Data])
+}
+
+given(bird.send(any([String].self, count: 2)))
+  .will { print($0) }
+
+bird.send(["Hi", "Hello"])         // Prints ["Hi", "Hello"]
+bird.send([Data([1]), Data([2])])  // Error: Missing stubbed implementation
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
typeT.​Type

The parameter type used to disambiguate overloaded methods.

+
count​MatcherCount​Matcher

A count matcher defining the number of acceptable elements in the collection.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/any(_:keys:)-e7f89d4/index.html b/docs/0.15.0/any(_:keys:)-e7f89d4/index.html new file mode 100755 index 00000000..e38ccf21 --- /dev/null +++ b/docs/0.15.0/any(_:keys:)-e7f89d4/index.html @@ -0,0 +1,126 @@ + + + + + + Mockingbird - any(_:keys:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +any(_:​keys:​) +

+ +
public func any<K, V>(_ type: Dictionary<K, V>.Type = Dictionary<K, V>.self, keys: K) -> Dictionary<K, V>
+
+

Matches any dictionary containing all of the keys.

+ +
+
+

Argument matching allows you to stub or verify specific invocations of parameterized methods. +Use the argument matcher any(keys:) to match dictionaries that contain all specified keys.

+ +
protocol Bird {
+  func send(_ messages: [UUID: String])
+}
+
+let messageId1 = UUID()
+let messageId2 = UUID()
+given(bird.send(any(containing: messageId1, messageId2)))
+  .will { print($0) }
+
+bird.send([
+  messageId1: "Hi",
+  messageId2: "Hello",
+])  // Prints ["Hi", "Hello"]
+
+bird.send([
+  UUID(): "Hi",
+  UUID(): "Hello",
+])  // Error: Missing stubbed implementation
+
+

Methods overloaded by parameter type can be disambiguated by explicitly specifying the type.

+ +
protocol Bird {
+  func send<T>(_ messages: [UUID: T])    // Overloaded generically
+  func send(_ messages: [UUID: String])  // Overloaded explicitly
+  func send(_ messages: [UUID: Data])
+}
+
+let messageId1 = UUID()
+let messageId2 = UUID()
+given(bird.send(any([UUID: String].self, containing: messageId1, messageId2)))
+  .will { print($0) }
+
+bird.send([
+  messageId1: "Hi",
+  messageId2: "Hello",
+])  // Prints ["Hi", "Hello"]
+
+bird.send([
+  messageId1: Data([1]),
+  messageId2: Data([2]),
+])  // Error: Missing stubbed implementation
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
typeDictionary<K, V>.​Type

The parameter type used to disambiguate overloaded methods.

+
keysK

A set of keys that must all exist in the dictionary to match.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/any(_:of:)-89cb3ec/index.html b/docs/0.15.0/any(_:of:)-89cb3ec/index.html new file mode 100755 index 00000000..c61dfb01 --- /dev/null +++ b/docs/0.15.0/any(_:of:)-89cb3ec/index.html @@ -0,0 +1,125 @@ + + + + + + Mockingbird - any(_:of:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +any(_:​of:​) +

+ +
public func any<T: AnyObject>(_ type: T.Type = T.self, of objects: T) -> T
+
+

Matches argument values identical to any of the provided values.

+ +
+
+

Argument matching allows you to stub or verify specific invocations of parameterized methods. +Use the argument matcher any(of:) to match objects identical to one or more of the specified +values.

+ +
// Reference type
+class Location {
+  let name: String
+  init(name: String) { self.name = name }
+}
+
+protocol Bird {
+  func fly(to location: Location)
+}
+
+let home = Location(name: "Home")
+let work = Location("Work")
+given(bird.fly(to: any(of: home, work)))
+  .will { print($0.name) }
+
+bird.fly(to: home)  // Prints "Home"
+bird.fly(to: work)  // Prints "Work"
+
+let hawaii = Location("Hawaii")
+bird.fly(to: hawaii))  // Error: Missing stubbed implementation
+
+

Methods overloaded by parameter type can be disambiguated by explicitly specifying the type.

+ +
protocol Bird {
+  func fly<T>(to location: T)        // Overloaded generically
+  func fly(to location: Location)    // Overloaded explicitly
+  func fly(to locationName: String)
+}
+
+given(bird.fly(to: any(String.self, of: "Home", "Work")))
+  .will { print($0) }
+
+bird.send("Home")    // Prints "Hi"
+bird.send("Work")    // Prints "Hello"
+bird.send("Hawaii")  // Error: Missing stubbed implementation
+
+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
typeT.​Type

The parameter type used to disambiguate overloaded methods.

+
objectsT

A set of non-equatable objects that should result in a match.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/any(_:of:)-e376f19/index.html b/docs/0.15.0/any(_:of:)-e376f19/index.html new file mode 100755 index 00000000..f97737a5 --- /dev/null +++ b/docs/0.15.0/any(_:of:)-e376f19/index.html @@ -0,0 +1,111 @@ + + + + + + Mockingbird - any(_:of:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +any(_:​of:​) +

+ +
public func any<T: Equatable>(_ type: T.Type = T.self, of objects: T) -> T
+
+

Matches argument values equal to any of the provided values.

+ +
+
+

Argument matching allows you to stub or verify specific invocations of parameterized methods. +Use the argument matcher any(of:) to match Equatable argument values equal to one or more of +the specified values.

+ +
given(bird.canChirp(volume: any(of: 1, 3)))
+  .willReturn(true)
+
+given(bird.canChirp(volume: any(of: 2, 4)))
+  .willReturn(false)
+
+print(bird.canChirp(volume: 1))  // Prints "true"
+print(bird.canChirp(volume: 2))  // Prints "false"
+print(bird.canChirp(volume: 3))  // Prints "true"
+print(bird.canChirp(volume: 4))  // Prints "false"
+
+

Methods overloaded by parameter type can be disambiguated by explicitly specifying the type.

+ +
protocol Bird {
+  func send<T>(_ message: T)    // Overloaded generically
+  func send(_ message: String)  // Overloaded explicitly
+  func send(_ message: Data)
+}
+
+given(bird.send(any(String.self, of: "Hi", "Hello")))
+  .will { print($0) }
+
+bird.send("Hi")     // Prints "Hi"
+bird.send("Hello")  // Prints "Hello"
+bird.send("Bye")    // Error: Missing stubbed implementation
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
typeT.​Type

The parameter type used to disambiguate overloaded methods.

+
objectsT

A set of equatable objects that should result in a match.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/any(_:where:)-ea2d92e/index.html b/docs/0.15.0/any(_:where:)-ea2d92e/index.html new file mode 100755 index 00000000..d1c16c2c --- /dev/null +++ b/docs/0.15.0/any(_:where:)-ea2d92e/index.html @@ -0,0 +1,118 @@ + + + + + + Mockingbird - any(_:where:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +any(_:​where:​) +

+ +
public func any<T>(_ type: T.Type = T.self, where predicate: @escaping (_ value: T) -> Bool) -> T
+
+

Matches any argument values where the predicate returns true.

+ +
+
+

Argument matching allows you to stub or verify specific invocations of parameterized methods. +Use the argument matcher any(where:) to match objects with custom equality logic. This is +particularly useful for parameter types that do not conform to Equatable.

+ +
// Value type not explicitly conforming to `Equatable`
+struct Fruit {
+  let size: Int
+}
+
+protocol Bird {
+  func eat(_ fruit: Fruit)
+}
+
+given(bird.eat(any(where: { $0.size < 100 })))
+  .will { print($0.size) }
+
+let apple = Fruit(size: 42)
+bird.eat(apple)  // Prints "42"
+
+let pear = Fruit(size: 9001)
+bird.eat(pear)   // Error: Missing stubbed implementation
+
+

Methods overloaded by parameter type can be disambiguated by explicitly specifying the type.

+ +
protocol Bird {
+  func eat<T>(_ object: T)     // Overloaded generically
+  func eat(_ fruit: Fruit)     // Overloaded explicitly
+  func eat(_ fruits: [Fruit])
+}
+
+given(bird.eat(any(Fruit.self, where: { $0.size < 100 })))
+  .will { print($0) }
+
+let apple = Fruit(size: 42)
+bird.eat(apple)    // Prints "42"
+bird.eat("Apple")  // Error: Missing stubbed implementation
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
typeT.​Type

The parameter type used to disambiguate overloaded methods.

+
predicate@escaping (_ value:​ T) -> Bool

A closure that takes a value and returns true if it represents a match.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/around(_:tolerance:)-831b19f/index.html b/docs/0.15.0/around(_:tolerance:)-831b19f/index.html new file mode 100755 index 00000000..16ac0bc2 --- /dev/null +++ b/docs/0.15.0/around(_:tolerance:)-831b19f/index.html @@ -0,0 +1,94 @@ + + + + + + Mockingbird - around(_:tolerance:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +around(_:​tolerance:​) +

+ +
public func around<T: FloatingPoint>(_ value: T, tolerance: T) -> T
+
+

Matches floating point arguments within some tolerance.

+ +
+
+

Mathematical operations on floating point numbers can cause loss of precision. Fuzzily match floating point arguments instead of using exact values to increase the robustness of tests.

+ +
protocol Bird {
+  func canChirp(volume: Double) -> Bool
+}
+
+given(bird.canChirp(volume: around(42.0, tolerance: 0.1)))
+  .willReturn(true)
+
+print(bird.canChirp(volume: 42.0))     // Prints "true"
+print(bird.canChirp(volume: 42.0999))  // Prints "true"
+print(bird.canChirp(volume: 42.1))     // Prints "false"
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
valueT

The expected value.

+
toleranceT

Only matches if the absolute difference is strictly less than this value.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/atLeast(_:)-c832002/index.html b/docs/0.15.0/atLeast(_:)-c832002/index.html new file mode 100755 index 00000000..2097b3f2 --- /dev/null +++ b/docs/0.15.0/atLeast(_:)-c832002/index.html @@ -0,0 +1,93 @@ + + + + + + Mockingbird - atLeast(_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +at​Least(_:​) +

+ +
public func atLeast(_ times: Int) -> CountMatcher
+
+

Matches greater than or equal to some count.

+ +
+
+

The atLeast count matcher can be used to verify that the actual number of invocations received +by a mock is greater than or equal to the expected number of invocations.

+ +
// Given two invocations (n = 2)
+bird.fly()
+bird.fly()
+
+verify(bird.fly()).wasCalled(atLeast(1))  // Passes
+verify(bird.fly()).wasCalled(atLeast(2))  // Passes
+verify(bird.fly()).wasCalled(atLeast(3))  // Fails (n < 3)
+
+

You can combine count matchers with adverbial counts for improved readability.

+ +
verify(bird.fly()).wasCalled(atLeast(once))
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
timesInt

An inclusive lower bound.

+
+

Returns

+

A count matcher.

+ +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/atMost(_:)-a2b82d3/index.html b/docs/0.15.0/atMost(_:)-a2b82d3/index.html new file mode 100755 index 00000000..391e42a5 --- /dev/null +++ b/docs/0.15.0/atMost(_:)-a2b82d3/index.html @@ -0,0 +1,93 @@ + + + + + + Mockingbird - atMost(_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +at​Most(_:​) +

+ +
public func atMost(_ times: Int) -> CountMatcher
+
+

Matches less than or equal to some count.

+ +
+
+

The atMost count matcher can be used to verify that the actual number of invocations received +by a mock is less than or equal to the expected number of invocations.

+ +
// Given two invocations (n = 2)
+bird.fly()
+bird.fly()
+
+verify(bird.fly()).wasCalled(atMost(1))  // Fails (n > 1)
+verify(bird.fly()).wasCalled(atMost(2))  // Passes
+verify(bird.fly()).wasCalled(atMost(3))  // Passes
+
+

You can combine count matchers with adverbial counts for improved readability.

+ +
verify(bird.fly()).wasCalled(atMost(once))
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
timesInt

An inclusive upper bound.

+
+

Returns

+

A count matcher.

+ +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/between(_:)-cfca747/index.html b/docs/0.15.0/between(_:)-cfca747/index.html new file mode 100755 index 00000000..d55227f9 --- /dev/null +++ b/docs/0.15.0/between(_:)-cfca747/index.html @@ -0,0 +1,92 @@ + + + + + + Mockingbird - between(_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +between(_:​) +

+ +
public func between(_ range: Range<Int>) -> CountMatcher
+
+

Matches counts that fall within some range.

+ +
+
+

The between count matcher can be used to verify that the actual number of invocations received +by a mock is within an inclusive range of expected invocations.

+ +
// Given two invocations (n = 2)
+bird.fly()
+bird.fly()
+
+verify(bird.fly()).wasCalled(between(1...2))  // Passes
+verify(bird.fly()).wasCalled(between(3...4))  // Fails (3 &nlt; n < 4)
+
+

You can combine count matchers with adverbial counts for improved readability.

+ +
verify(bird.fly()).wasCalled(between(once...twice))
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
rangeRange<Int>

An closed integer range.

+
+

Returns

+

A count matcher.

+ +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/clearDefaultValues(on:)-112773d/index.html b/docs/0.15.0/clearDefaultValues(on:)-112773d/index.html new file mode 100755 index 00000000..08fb4962 --- /dev/null +++ b/docs/0.15.0/clearDefaultValues(on:)-112773d/index.html @@ -0,0 +1,88 @@ + + + + + + Mockingbird - clearDefaultValues(on:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +clear​Default​Values(on:​) +

+ +
public func clearDefaultValues(on mocks: Mock)
+
+

Remove all registered default values.

+ +
+
+

Partially reset a set of mocks during test runs by removing all registered default values.

+ +
let bird = mock(Bird.self)
+bird.useDefaultValues(from: .standardProvider)
+
+print(bird.name)  // Prints ""
+verify(bird.getName()).wasCalled()  // Passes
+
+clearDefaultValues(on: bird)
+
+print(bird.name)  // Error: Missing stubbed implementation
+verify(bird.getName()).wasCalled()  // Passes
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
mocksMock

A set of mocks to reset.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/clearInvocations(on:)-4120e8f/index.html b/docs/0.15.0/clearInvocations(on:)-4120e8f/index.html new file mode 100755 index 00000000..d81defc1 --- /dev/null +++ b/docs/0.15.0/clearInvocations(on:)-4120e8f/index.html @@ -0,0 +1,88 @@ + + + + + + Mockingbird - clearInvocations(on:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +clear​Invocations(on:​) +

+ +
public func clearInvocations(on mocks: Mock)
+
+

Remove all recorded invocations.

+ +
+
+

Partially reset a set of mocks during test runs by removing all recorded invocations.

+ +
let bird = mock(Bird.self)
+given(bird.getName()).willReturn("Ryan")
+
+print(bird.name)  // Prints "Ryan"
+verify(bird.getName()).wasCalled()  // Passes
+
+clearInvocations(on: bird)
+
+print(bird.name)  // Prints "Ryan"
+verify(bird.getName()).wasCalled()  // Error: Got 0 invocations
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
mocksMock

A set of mocks to reset.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/clearStubs(on:)-f985ed7/index.html b/docs/0.15.0/clearStubs(on:)-f985ed7/index.html new file mode 100755 index 00000000..c9ad7bbd --- /dev/null +++ b/docs/0.15.0/clearStubs(on:)-f985ed7/index.html @@ -0,0 +1,88 @@ + + + + + + Mockingbird - clearStubs(on:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +clear​Stubs(on:​) +

+ +
public func clearStubs(on mocks: Mock)
+
+

Remove all concrete stubs.

+ +
+
+

Partially reset a set of mocks during test runs by removing all stubs.

+ +
let bird = mock(Bird.self)
+given(bird.getName()).willReturn("Ryan")
+
+print(bird.name)  // Prints "Ryan"
+verify(bird.getName()).wasCalled()  // Passes
+
+clearStubs(on: bird)
+
+print(bird.name)  // Error: Missing stubbed implementation
+verify(bird.getName()).wasCalled()  // Passes
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
mocksMock

A set of mocks to reset.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/eventually(_:_:)-28d4191/index.html b/docs/0.15.0/eventually(_:_:)-28d4191/index.html new file mode 100755 index 00000000..2e2ee885 --- /dev/null +++ b/docs/0.15.0/eventually(_:_:)-28d4191/index.html @@ -0,0 +1,99 @@ + + + + + + Mockingbird - eventually(_:_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +eventually(_:​_:​) +

+ +
public func eventually(_ description: String? = nil, _ block: () -> Void) -> XCTestExpectation
+
+

Create a deferrable test expectation from a block containing verification calls.

+ +
+
+

Mocked methods that are invoked asynchronously can be verified using an eventually block which +returns an XCTestExpectation.

+ +
DispatchQueue.main.async {
+  Tree(with: bird).shake()
+}
+
+let expectation =
+  eventually {
+    verify(bird.fly()).wasCalled()
+    verify(bird.chirp()).wasCalled()
+  }
+
+wait(for: [expectation], timeout: 1.0)
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
descriptionString?

An optional description for the created XCTestExpectation.

+
block() -> Void

A block containing verification calls.

+
+

Returns

+

An XCTestExpectation that fulfilles once all verifications in the block are met.

+ +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/exactly(_:)-47abdfc/index.html b/docs/0.15.0/exactly(_:)-47abdfc/index.html new file mode 100755 index 00000000..b804dcfd --- /dev/null +++ b/docs/0.15.0/exactly(_:)-47abdfc/index.html @@ -0,0 +1,92 @@ + + + + + + Mockingbird - exactly(_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +exactly(_:​) +

+ +
public func exactly(_ times: Int) -> CountMatcher
+
+

Matches an exact count.

+ +
+
+

The exactly count matcher can be used to verify that the actual number of invocations received +by a mock equals the expected number of invocations.

+ +
// Given two invocations (n = 2)
+bird.fly()
+bird.fly()
+
+verify(bird.fly()).wasCalled(exactly(1))  // Fails (n ≠ 1)
+verify(bird.fly()).wasCalled(exactly(2))  // Passes
+
+

You can combine count matchers with adverbial counts for improved readability.

+ +
verify(bird.fly()).wasCalled(exactly(once))
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
timesInt

An exact integer count.

+
+

Returns

+

A count matcher.

+ +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/finiteSequence(of:)-9390bb3/index.html b/docs/0.15.0/finiteSequence(of:)-9390bb3/index.html new file mode 100755 index 00000000..da63c24f --- /dev/null +++ b/docs/0.15.0/finiteSequence(of:)-9390bb3/index.html @@ -0,0 +1,85 @@ + + + + + + Mockingbird - finiteSequence(of:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +finite​Sequence(of:​) +

+ +
public func finiteSequence<DeclarationType: Declaration, InvocationType, ReturnType>(of values: ReturnType) -> ImplementationProvider<DeclarationType, InvocationType, ReturnType>
+
+

Stub a finite sequence of values.

+ +
+
+

Provide one or more values which will be returned sequentially for each invocation. The stub +will be invalidated if the number of invocations is greater than the number of values provided.

+ +
given(bird.getName())
+  .willReturn(finiteSequence(of: "Ryan", "Sterling"))
+
+print(bird.name)  // Prints "Ryan"
+print(bird.name)  // Prints "Sterling"
+print(bird.name)  // Error: Missing stubbed implementation
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
valuesReturn​Type

A sequence of values to stub.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/finiteSequence(of:)-ff3ed8b/index.html b/docs/0.15.0/finiteSequence(of:)-ff3ed8b/index.html new file mode 100755 index 00000000..b6e1168f --- /dev/null +++ b/docs/0.15.0/finiteSequence(of:)-ff3ed8b/index.html @@ -0,0 +1,89 @@ + + + + + + Mockingbird - finiteSequence(of:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +finite​Sequence(of:​) +

+ +
public func finiteSequence<DeclarationType: Declaration, InvocationType, ReturnType>(of implementations: InvocationType) -> ImplementationProvider<DeclarationType, InvocationType, ReturnType>
+
+

Stub a finite sequence of implementations.

+ +
+
+

Provide one or more implementations which will be returned sequentially for each invocation. The +stub will be invalidated if the number of invocations is greater than the number of +implementations provided.

+ +
given(bird.getName()).willReturn(finiteSequence(of: {
+  return Bool.random() ? "Ryan" : "Meisters"
+}, {
+  return Bool.random() ? "Sterling" : "Hackley"
+}))
+
+print(bird.name)  // Prints "Ryan"
+print(bird.name)  // Prints "Sterling"
+print(bird.name)  // Error: Missing stubbed implementation
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
implementationsInvocation​Type

A sequence of implementations to stub.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/given(_:)-05dd78f/index.html b/docs/0.15.0/given(_:)-05dd78f/index.html new file mode 100755 index 00000000..d2bba6e2 --- /dev/null +++ b/docs/0.15.0/given(_:)-05dd78f/index.html @@ -0,0 +1,96 @@ + + + + + + Mockingbird - given(_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +given(_:​) +

+ +
public func given<DeclarationType: Declaration, InvocationType, ReturnType>(_ declarations: Mockable<DeclarationType, InvocationType, ReturnType>) -> StubbingManager<DeclarationType, InvocationType, ReturnType>
+
+

Stub one or more declarations to return a value or perform an operation.

+ +
+
+

Stubbing allows you to define custom behavior for mocks to perform.

+ +
given(bird.canChirp()).willReturn(true)
+given(bird.canChirp()).willThrow(BirdError())
+given(bird.canChirp(volume: any())).will { volume in
+  return volume < 42
+}
+
+

This is equivalent to the shorthand syntax using the stubbing operator ~>.

+ +
given(bird.canChirp()) ~> true
+given(bird.canChirp()) ~> { throw BirdError() }
+given(bird.canChirp(volume: any())) ~> { volume in
+  return volume < 42
+}
+
+

Properties can be stubbed with their getter and setter methods.

+ +
given(bird.getName()).willReturn("Ryan")
+given(bird.setName(any())).will { print($0) }
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
declarationsMockable<Declaration​Type, Invocation​Type, Return​Type>

One or more stubbable declarations.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/inOrder(with:file:line:_:)-3c038cb/index.html b/docs/0.15.0/inOrder(with:file:line:_:)-3c038cb/index.html new file mode 100755 index 00000000..027532fa --- /dev/null +++ b/docs/0.15.0/inOrder(with:file:line:_:)-3c038cb/index.html @@ -0,0 +1,117 @@ + + + + + + Mockingbird - inOrder(with:file:line:_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +in​Order(with:​file:​line:​_:​) +

+ +
public func inOrder(with options: OrderedVerificationOptions = [], file: StaticString = #file, line: UInt = #line, _ block: () -> Void)
+
+

Enforce the relative order of invocations.

+ +
+
+

Calls to verify within the scope of an inOrder verification block are checked relative to +each other.

+ +
// Verify that `fly` was called before `chirp`
+inOrder {
+  verify(bird.fly()).wasCalled()
+  verify(bird.chirp()).wasCalled()
+}
+
+

Pass options to inOrder verification blocks for stricter checks with additional invariants.

+ +
inOrder(with: .noInvocationsAfter) {
+  verify(bird.fly()).wasCalled()
+  verify(bird.chirp()).wasCalled()
+}
+
+

An inOrder block is resolved greedily, such that each verification must happen from the oldest +remaining unsatisfied invocations.

+ +
// Given these unsatisfied invocations
+bird.fly()
+bird.fly()
+bird.chirp()
+
+// Greedy strategy _must_ start from the first `fly`
+inOrder {
+  verify(bird.fly()).wasCalled(twice)
+  verify(bird.chirp()).wasCalled()
+}
+
+// Non-greedy strategy can start from the second `fly`
+inOrder {
+  verify(bird.fly()).wasCalled()
+  verify(bird.chirp()).wasCalled()
+}
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
optionsOrdered​Verification​Options

Options to use when verifying invocations.

+
block() -> Void

A block containing ordered verification calls.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/index.html b/docs/0.15.0/index.html new file mode 100755 index 00000000..036232df --- /dev/null +++ b/docs/0.15.0/index.html @@ -0,0 +1,746 @@ + + + + + + Mockingbird - Mockingbird + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+
+

Classes

+
+
+ + Argument​Captor + +
+
+

Captures method arguments passed during mock invocations.

+ +
+
+ + Argument​Matcher + +
+
+

Matches argument values with a comparator.

+ +
+
+ + Static​Mock + +
+
+

Used to store invocations on static or class scoped methods.

+ +
+
+ + Variable​Declaration + +
+
+

Mockable variable declarations.

+ +
+
+ + Property​Getter​Declaration + +
+
+

Mockable property getter declarations.

+ +
+
+ + Property​Setter​Declaration + +
+
+

Mockable property setter declarations.

+ +
+
+ + Function​Declaration + +
+
+

Mockable function declarations.

+ +
+
+ + Throwing​Function​Declaration + +
+
+

Mockable throwing function declarations.

+ +
+
+ + Subscript​Declaration + +
+
+

Mockable subscript declarations.

+ +
+
+ + Subscript​Getter​Declaration + +
+
+

Mockable subscript getter declarations.

+ +
+
+ + Subscript​Setter​Declaration + +
+
+

Mockable subscript setter declarations.

+ +
+
+ + Mocking​Context + +
+
+

Stores invocations received by mocks.

+ +
+
+ + Stubbing​Manager + +
+
+

An intermediate object used for stubbing declarations returned by given.

+ +
+
+ + Stubbing​Context + +
+
+

Stores stubbed implementations used by mocks.

+ +
+
+ + Non​Escaping​Closure + +
+
+

Placeholder for non-escaping closure parameter types.

+ +
+
+
+
+

Structures

+
+
+ + Count​Matcher + +
+
+

Checks whether a number matches some expected count.

+ +
+
+ + Mock​Metadata + +
+
+

Stores information about generated mocks.

+ +
+
+ + Mockable + +
+
+

Represents a mocked declaration that can be stubbed or verified.

+ +
+
+ + Implementation​Provider + +
+
+

Provides implementation functions used to stub behavior and return values.

+ +
+
+ + Value​Provider + +
+
+

Provides concrete instances of types.

+ +
+
+ + Symbol​Print​Options + +
+
+

These options mimic those used in the Swift project. Check that project for details.

+ +
+
+ + Swift​Symbol + +
+
+ +
+
+ + Source​Location + +
+
+

References a line of code in a file.

+ +
+
+ + Ordered​Verification​Options + +
+
+

Additional options to increase the strictness of inOrder verification blocks.

+ +
+
+ + Verification​Manager + +
+
+

An intermediate object used for verifying declarations returned by verify.

+ +
+
+
+
+

Enumerations

+
+
+ + Stubbing​Manager.​Transition​Strategy + +
+
+

When to use the next chained implementation provider.

+ +
+
+ + Swift​Symbol.​Contents + +
+
+ +
+
+ + Swift​Symbol.​Kind + +
+
+ +
+
+ + Swift​Symbol​Parse​Error + +
+
+

A type for representing the different possible failure conditions when using ScalarScanner

+ +
+
+
+
+

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.

+ +
+
+ + Test​Failer + +
+
+

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.

+ +
+
+ + not​Empty(_:​) + +
+
+

Matches any collection with at least one element.

+ +
+
+ + around(_:​tolerance:​) + +
+
+

Matches floating point arguments within some tolerance.

+ +
+
+ + exactly(_:​) + +
+
+

Matches an exact count.

+ +
+
+ + at​Least(_:​) + +
+
+

Matches greater than or equal to some count.

+ +
+
+ + at​Most(_:​) + +
+
+

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.

+ +
+
+ + not​Nil(_:​) + +
+
+

Matches any non-nil argument value.

+ +
+
+ + mock(_:​) + +
+
+

Returns a mock of a given type.

+ +
+
+ + reset(_:​) + +
+
+

Remove all recorded invocations and configured stubs.

+ +
+
+ + clear​Invocations(on:​) + +
+
+

Remove all recorded invocations.

+ +
+
+ + clear​Stubs(on:​) + +
+
+

Remove all concrete stubs.

+ +
+
+ + clear​Default​Values(on:​) + +
+
+

Remove all registered default values.

+ +
+
+ + use​Default​Values(from:​on:​) + +
+
+

Start returning default values for unstubbed methods on multiple mocks.

+ +
+
+ + use​Default​Values(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.

+ +
+
+ + looping​Sequence(of:​) + +
+
+

Stub a looping sequence of values.

+ +
+
+ + looping​Sequence(of:​) + +
+
+

Stub a looping sequence of implementations.

+ +
+
+ + finite​Sequence(of:​) + +
+
+

Stub a finite sequence of values.

+ +
+
+ + finite​Sequence(of:​) + +
+
+

Stub a finite sequence of implementations.

+ +
+
+ + last​Set​Value(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.

+ +
+
+ + parse​Mangled​Swift​Symbol(_:​is​Type:​) + +
+
+

This is likely to be the primary entry point to this file. Pass a string containing a Swift mangled symbol or type, get a parsed SwiftSymbol structure which can then be directly examined or printed.

+ +
+
+ + parse​Mangled​Swift​Symbol(_:​is​Type:​symbolic​Reference​Resolver:​) + +
+
+

Pass a collection of UnicodeScalars containing a Swift mangled symbol or type, get a parsed SwiftSymbol structure which can then be directly examined or printed.

+ +
+
+ + eventually(_:​_:​) + +
+
+

Create a deferrable test expectation from a block containing verification calls.

+ +
+
+ + in​Order(with:​file:​line:​_:​) + +
+
+

Enforce the relative order of invocations.

+ +
+
+ + verify(_:​file:​line:​) + +
+
+

Verify that a mock recieved a specific invocation some number of times.

+ +
+
+ + swizzle​Test​Failer(_:​) + +
+
+

Change the current global test failer.

+ +
+
+ + MKBFail(_:​is​Fatal:​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.

+ +
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/lastSetValue(initial:)-576c55c/index.html b/docs/0.15.0/lastSetValue(initial:)-576c55c/index.html new file mode 100755 index 00000000..408ff4c0 --- /dev/null +++ b/docs/0.15.0/lastSetValue(initial:)-576c55c/index.html @@ -0,0 +1,73 @@ + + + + + + Mockingbird - lastSetValue(initial:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +last​Set​Value(initial:​) +

+ +
public func lastSetValue<DeclarationType: PropertyGetterDeclaration, InvocationType, ReturnType>(initial: ReturnType) -> ImplementationProvider<DeclarationType, InvocationType, ReturnType>
+
+

Stubs a variable getter to return the last value received by the setter.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
initialReturn​Type

The initial value to return.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/loopingSequence(of:)-8ab9cb4/index.html b/docs/0.15.0/loopingSequence(of:)-8ab9cb4/index.html new file mode 100755 index 00000000..72156c5e --- /dev/null +++ b/docs/0.15.0/loopingSequence(of:)-8ab9cb4/index.html @@ -0,0 +1,87 @@ + + + + + + Mockingbird - loopingSequence(of:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +looping​Sequence(of:​) +

+ +
public func loopingSequence<DeclarationType: Declaration, InvocationType, ReturnType>(of values: ReturnType) -> ImplementationProvider<DeclarationType, InvocationType, ReturnType>
+
+

Stub a looping sequence of values.

+ +
+
+

Provide one or more values which will be returned sequentially for each invocation. The sequence +will loop from the beginning if the number of invocations is greater than the number of values +provided.

+ +
given(bird.getName())
+  .willReturn(loopingSequence(of: "Ryan", "Sterling"))
+
+print(bird.name)  // Prints "Ryan"
+print(bird.name)  // Prints "Sterling"
+print(bird.name)  // Prints "Ryan"
+print(bird.name)  // Prints "Sterling"
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
valuesReturn​Type

A sequence of values to stub.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/loopingSequence(of:)-9da831b/index.html b/docs/0.15.0/loopingSequence(of:)-9da831b/index.html new file mode 100755 index 00000000..a83596ac --- /dev/null +++ b/docs/0.15.0/loopingSequence(of:)-9da831b/index.html @@ -0,0 +1,90 @@ + + + + + + Mockingbird - loopingSequence(of:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +looping​Sequence(of:​) +

+ +
public func loopingSequence<DeclarationType: Declaration, InvocationType, ReturnType>(of implementations: InvocationType) -> ImplementationProvider<DeclarationType, InvocationType, ReturnType>
+
+

Stub a looping sequence of implementations.

+ +
+
+

Provide one or more implementations which will be returned sequentially for each invocation. The +sequence will loop from the beginning if the number of invocations is greater than the number of +implementations provided.

+ +
given(bird.getName()).willReturn(loopingSequence(of: {
+  return Bool.random() ? "Ryan" : "Meisters"
+}, {
+  return Bool.random() ? "Sterling" : "Hackley"
+}))
+
+print(bird.name)  // Prints "Ryan"
+print(bird.name)  // Prints "Sterling"
+print(bird.name)  // Prints "Meisters"
+print(bird.name)  // Prints "Hackley"
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
implementationsInvocation​Type

A sequence of implementations to stub.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/mock(_:)-b93ee0e/index.html b/docs/0.15.0/mock(_:)-b93ee0e/index.html new file mode 100755 index 00000000..21e93439 --- /dev/null +++ b/docs/0.15.0/mock(_:)-b93ee0e/index.html @@ -0,0 +1,94 @@ + + + + + + Mockingbird - mock(_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +mock(_:​) +

+ +
@available(*, unavailable, message: "No generated mock for this type which might be resolved by building the test target (⇧⌘U)") public func mock<T>(_ type: T.Type) -> T
+
+

Returns a mock of a given type.

+ +
+
+

Initialized mocks can be passed in place of the original type. Protocol mocks do not require +explicit initialization while class mocks should be created using initialize(…).

+ +
protocol Bird {
+  init(name: String)
+}
+class Tree {
+  init(with bird: Bird) {}
+}
+
+let bird = mock(Bird.self)  // Protocol mock
+let tree = mock(Tree.self).initialize(with: bird)  // Class mock
+
+

Generated mock types are suffixed with Mock and should not be coerced into their supertype.

+ +
let bird: BirdMock = mock(Bird.self)  // The concrete type is `BirdMock`
+let inferredBird = mock(Bird.self)    // Type inference also works
+let coerced: Bird = mock(Bird.self)   // Avoid upcasting mocks
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
typeT.​Type

The type to mock.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/never-9661ceb/index.html b/docs/0.15.0/never-9661ceb/index.html new file mode 100755 index 00000000..b003a7e2 --- /dev/null +++ b/docs/0.15.0/never-9661ceb/index.html @@ -0,0 +1,54 @@ + + + + + + Mockingbird - never + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Variable +never +

+ +
let never: Int
+
+

A count of zero.

+ +
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/not(_:)-3f926b2/index.html b/docs/0.15.0/not(_:)-3f926b2/index.html new file mode 100755 index 00000000..aa626e89 --- /dev/null +++ b/docs/0.15.0/not(_:)-3f926b2/index.html @@ -0,0 +1,84 @@ + + + + + + Mockingbird - not(_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +not(_:​) +

+ +
public func not(_ times: Int) -> CountMatcher
+
+

Negate an exact count, only passing on non-matching counts.

+ +
+
+

Combined count matchers can be used to perform complex checks on the number of invocations +received.

+ +
// Checks that n ≠ 1
+verify(bird.fly()).wasCalled(not(once))
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
count​Matcher

An exact count to negate.

+
+

Returns

+

A negated count matcher.

+ +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/not(_:)-cf99a2a/index.html b/docs/0.15.0/not(_:)-cf99a2a/index.html new file mode 100755 index 00000000..a3af824c --- /dev/null +++ b/docs/0.15.0/not(_:)-cf99a2a/index.html @@ -0,0 +1,84 @@ + + + + + + Mockingbird - not(_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +not(_:​) +

+ +
public func not(_ countMatcher: CountMatcher) -> CountMatcher
+
+

Negate a count matcher, only passing on non-matching counts.

+ +
+
+

Combined count matchers can be used to perform complex checks on the number of invocations +received.

+ +
// Checks that n ≠ 1
+verify(bird.fly()).wasCalled(not(exactly(once)))
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
count​MatcherCount​Matcher

A count matcher to negate.

+
+

Returns

+

A negated count matcher.

+ +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/notEmpty(_:)-3cab350/index.html b/docs/0.15.0/notEmpty(_:)-3cab350/index.html new file mode 100755 index 00000000..96adbca4 --- /dev/null +++ b/docs/0.15.0/notEmpty(_:)-3cab350/index.html @@ -0,0 +1,101 @@ + + + + + + Mockingbird - notEmpty(_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +not​Empty(_:​) +

+ +
public func notEmpty<T: Collection>(_ type: T.Type = T.self) -> T
+
+

Matches any collection with at least one element.

+ +
+
+

Argument matching allows you to stub or verify specific invocations of parameterized methods. +Use the argument matcher notEmpty to match collections with one or more elements.

+ +
protocol Bird {
+  func send(_ messages: [String])
+}
+
+given(bird.send(any(count: 2))).will { print($0) }
+
+bird.send(["Hi"])  // Prints ["Hi"]
+bird.send([])      // Error: Missing stubbed implementation
+
+

Methods overloaded by parameter type can be disambiguated by explicitly specifying the type.

+ +
protocol Bird {
+  func send<T>(_ messages: [T])    // Overloaded generically
+  func send(_ messages: [String])  // Overloaded explicitly
+  func send(_ messages: [Data])
+}
+
+given(bird.send(notEmpty([String].self)))
+  .will { print($0) }
+
+bird.send(["Hi"])       // Prints ["Hi"]
+bird.send([Data([1])])  // Error: Missing stubbed implementation
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
typeT.​Type

The parameter type used to disambiguate overloaded methods.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/notNil(_:)-42278eb/index.html b/docs/0.15.0/notNil(_:)-42278eb/index.html new file mode 100755 index 00000000..290d505e --- /dev/null +++ b/docs/0.15.0/notNil(_:)-42278eb/index.html @@ -0,0 +1,101 @@ + + + + + + Mockingbird - notNil(_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +not​Nil(_:​) +

+ +
public func notNil<T>(_ type: T.Type = T.self) -> T
+
+

Matches any non-nil argument value.

+ +
+
+

Argument matching allows you to stub or verify specific invocations of parameterized methods. +Use the argument matcher notNil to match non-nil argument values.

+ +
protocol Bird {
+  func send(_ message: String?)
+}
+
+given(bird.send(notNil())).will { print($0) }
+
+bird.send("Hello")  // Prints Optional("Hello")
+bird.send(nil)      // Error: Missing stubbed implementation
+
+

Methods overloaded by parameter type can be disambiguated by explicitly specifying the type.

+ +
protocol Bird {
+  func send<T>(_ message: T?)    // Overloaded generically
+  func send(_ message: String?)  // Overloaded explicitly
+  func send(_ messages: Data?)
+}
+
+given(bird.send(notNil(String?.self)))
+  .will { print($0) }
+
+bird.send("Hello")    // Prints Optional("Hello")
+bird.send(nil)        // Error: Missing stubbed implementation
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
typeT.​Type

The parameter type used to disambiguate overloaded methods.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/once-3db83dd/index.html b/docs/0.15.0/once-3db83dd/index.html new file mode 100755 index 00000000..746782ff --- /dev/null +++ b/docs/0.15.0/once-3db83dd/index.html @@ -0,0 +1,54 @@ + + + + + + Mockingbird - once + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Variable +once +

+ +
let once: Int
+
+

A count of one.

+ +
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/parseMangledSwiftSymbol(_:isType:)-3be6b73/index.html b/docs/0.15.0/parseMangledSwiftSymbol(_:isType:)-3be6b73/index.html new file mode 100755 index 00000000..7884692d --- /dev/null +++ b/docs/0.15.0/parseMangledSwiftSymbol(_:isType:)-3be6b73/index.html @@ -0,0 +1,85 @@ + + + + + + Mockingbird - parseMangledSwiftSymbol(_:isType:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +parse​Mangled​Swift​Symbol(_:​is​Type:​) +

+ +
public func parseMangledSwiftSymbol(_ mangled: String, isType: Bool = false) throws -> SwiftSymbol
+
+

This is likely to be the primary entry point to this file. Pass a string containing a Swift mangled symbol or type, get a parsed SwiftSymbol structure which can then be directly examined or printed.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
mangledString

the string to be parsed ("isType` is false, the string should start with a Swift Symbol prefix, _T, _$S or $S).

+
is​TypeBool

if true, no prefix is parsed and, on completion, the first item on the parse stack is returned.

+
+

Throws

+

a SwiftSymbolParseError error that contains parse position when the error occurred.

+ +

Returns

+

the successfully parsed result

+ +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/parseMangledSwiftSymbol(_:isType:symbolicReferenceResolver:)-111617a/index.html b/docs/0.15.0/parseMangledSwiftSymbol(_:isType:symbolicReferenceResolver:)-111617a/index.html new file mode 100755 index 00000000..31dffe20 --- /dev/null +++ b/docs/0.15.0/parseMangledSwiftSymbol(_:isType:symbolicReferenceResolver:)-111617a/index.html @@ -0,0 +1,85 @@ + + + + + + Mockingbird - parseMangledSwiftSymbol(_:isType:symbolicReferenceResolver:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +parse​Mangled​Swift​Symbol(_:​is​Type:​symbolic​Reference​Resolver:​) +

+ +
public func parseMangledSwiftSymbol<C: Collection>(_ mangled: C, isType: Bool = false, symbolicReferenceResolver: ((Int32, Int) throws -> SwiftSymbol)? = nil) throws -> SwiftSymbol where C.Iterator.Element == UnicodeScalar
+
+

Pass a collection of UnicodeScalars containing a Swift mangled symbol or type, get a parsed SwiftSymbol structure which can then be directly examined or printed.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
mangledC

the collection of UnicodeScalars to be parsed ("isType` is false, the string should start with a Swift Symbol prefix, _T, _$S or $S).

+
is​TypeBool

if true, no prefix is parsed and, on completion, the first item on the parse stack is returned.

+
+

Throws

+

a SwiftSymbolParseError error that contains parse position when the error occurred.

+ +

Returns

+

the successfully parsed result

+ +
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/reset(_:)-2a0feaf/index.html b/docs/0.15.0/reset(_:)-2a0feaf/index.html new file mode 100755 index 00000000..dd225481 --- /dev/null +++ b/docs/0.15.0/reset(_:)-2a0feaf/index.html @@ -0,0 +1,89 @@ + + + + + + Mockingbird - reset(_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +reset(_:​) +

+ +
public func reset(_ mocks: Mock)
+
+

Remove all recorded invocations and configured stubs.

+ +
+
+

Fully reset a set of mocks during test runs by removing all recorded invocations and clearing +all configurations.

+ +
let bird = mock(Bird.self)
+given(bird.getName()).willReturn("Ryan")
+
+print(bird.name)  // Prints "Ryan"
+verify(bird.getName()).wasCalled()  // Passes
+
+reset(bird)
+
+print(bird.name)  // Error: Missing stubbed implementation
+verify(bird.getName()).wasCalled()  // Error: Got 0 invocations
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
mocksMock

A set of mocks to reset.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/sequence(of:)-c40bb93/index.html b/docs/0.15.0/sequence(of:)-c40bb93/index.html new file mode 100755 index 00000000..a5add1b4 --- /dev/null +++ b/docs/0.15.0/sequence(of:)-c40bb93/index.html @@ -0,0 +1,89 @@ + + + + + + Mockingbird - sequence(of:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +sequence(of:​) +

+ +
public func sequence<DeclarationType: Declaration, InvocationType, ReturnType>(of implementations: InvocationType) -> ImplementationProvider<DeclarationType, InvocationType, ReturnType>
+
+

Stub a sequence of implementations.

+ +
+
+

Provide one or more implementations which will be returned sequentially for each invocation. The +last implementation will be used if the number of invocations is greater than the number of +implementations provided.

+ +
given(bird.getName()).willReturn(sequence(of: {
+  return Bool.random() ? "Ryan" : "Meisters"
+}, {
+  return Bool.random() ? "Sterling" : "Hackley"
+}))
+
+print(bird.name)  // Prints "Ryan"
+print(bird.name)  // Prints "Sterling"
+print(bird.name)  // Prints "Hackley"
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
implementationsInvocation​Type

A sequence of implementations to stub.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/sequence(of:)-d9da3e4/index.html b/docs/0.15.0/sequence(of:)-d9da3e4/index.html new file mode 100755 index 00000000..c9e48c4e --- /dev/null +++ b/docs/0.15.0/sequence(of:)-d9da3e4/index.html @@ -0,0 +1,85 @@ + + + + + + Mockingbird - sequence(of:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +sequence(of:​) +

+ +
public func sequence<DeclarationType: Declaration, InvocationType, ReturnType>(of values: ReturnType) -> ImplementationProvider<DeclarationType, InvocationType, ReturnType>
+
+

Stub a sequence of values.

+ +
+
+

Provide one or more values which will be returned sequentially for each invocation. The last +value will be used if the number of invocations is greater than the number of values provided.

+ +
given(bird.getName())
+  .willReturn(sequence(of: "Ryan", "Sterling"))
+
+print(bird.name)  // Prints "Ryan"
+print(bird.name)  // Prints "Sterling"
+print(bird.name)  // Prints "Sterling"
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
valuesReturn​Type

A sequence of values to stub.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/swizzleTestFailer(_:)-d923326/index.html b/docs/0.15.0/swizzleTestFailer(_:)-d923326/index.html new file mode 100755 index 00000000..f99aa1f8 --- /dev/null +++ b/docs/0.15.0/swizzleTestFailer(_:)-d923326/index.html @@ -0,0 +1,73 @@ + + + + + + Mockingbird - swizzleTestFailer(_:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +swizzle​Test​Failer(_:​) +

+ +
public func swizzleTestFailer(_ newTestFailer: TestFailer)
+
+

Change the current global test failer.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
new​Test​FailerTest​Failer

A test failer instance to start handling test failures.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/twice-f36cfd6/index.html b/docs/0.15.0/twice-f36cfd6/index.html new file mode 100755 index 00000000..3e5116be --- /dev/null +++ b/docs/0.15.0/twice-f36cfd6/index.html @@ -0,0 +1,54 @@ + + + + + + Mockingbird - twice + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Variable +twice +

+ +
let twice: Int
+
+

A count of two.

+ +
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/useDefaultValues(from:on:)-5df93fa/index.html b/docs/0.15.0/useDefaultValues(from:on:)-5df93fa/index.html new file mode 100755 index 00000000..1e88b784 --- /dev/null +++ b/docs/0.15.0/useDefaultValues(from:on:)-5df93fa/index.html @@ -0,0 +1,115 @@ + + + + + + Mockingbird - useDefaultValues(from:on:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +use​Default​Values(from:​on:​) +

+ +
public func useDefaultValues(from valueProvider: ValueProvider, on mock: Mock)
+
+

Start returning default values for unstubbed methods on a single mock.

+ +
+
+

Mocks are strict by default, meaning that calls to unstubbed methods will trigger a test +failure. Methods returning Void do not need to be stubbed in strict mode.

+ +
let bird = mock(Bird.self)
+print(bird.name)  // Fails because `bird.getName()` is not stubbed
+bird.fly()        // Okay because `fly()` has a `Void` return type
+
+

To return default values for unstubbed methods, use a ValueProvider with the initialized mock. +Mockingbird provides preset value providers which are guaranteed to be backwards compatible, +such as .standardProvider.

+ +
useDefaultValues(from: .standardProvider, on: bird)
+print(bird.name)  // Prints ""
+
+

You can create custom value providers by registering values for types. See Providable for how +to provide "wildcard" instances for generic types.

+ +
var valueProvider = ValueProvider(from: .standardProvider)
+valueProvider.register("Ryan", for: String.self)
+useDefaultValues(from: valueProvider, on: bird)
+print(bird.name)  // Prints "Ryan"
+
+

Values from concrete stubs always have a higher precedence than default values.

+ +
given(bird.getName()) ~> "Ryan"
+print(bird.name)  // Prints "Ryan"
+
+useDefaultValues(from: .standardProvider, on: bird)
+print(bird.name)  // Prints "Ryan"
+
+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
value​ProviderValue​Provider

A value provider to add.

+
mockMock

A mock that should start using the value provider.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/useDefaultValues(from:on:)-7eb6cc5/index.html b/docs/0.15.0/useDefaultValues(from:on:)-7eb6cc5/index.html new file mode 100755 index 00000000..3b51f506 --- /dev/null +++ b/docs/0.15.0/useDefaultValues(from:on:)-7eb6cc5/index.html @@ -0,0 +1,122 @@ + + + + + + Mockingbird - useDefaultValues(from:on:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +use​Default​Values(from:​on:​) +

+ +
public func useDefaultValues(from valueProvider: ValueProvider, on mocks: [Mock])
+
+

Start returning default values for unstubbed methods on multiple mocks.

+ +
+
+

Mocks are strict by default, meaning that calls to unstubbed methods will trigger a test +failure. Methods returning Void do not need to be stubbed in strict mode.

+ +
let bird = mock(Bird.self)
+print(bird.name)  // Fails because `bird.getName()` is not stubbed
+bird.fly()        // Okay because `fly()` has a `Void` return type
+
+

To return default values for unstubbed methods, use a ValueProvider with the initialized mock. +Mockingbird provides preset value providers which are guaranteed to be backwards compatible, +such as .standardProvider.

+ +
let anotherBird = mock(Bird.self)
+useDefaultValues(from: .standardProvider, on: [bird, anotherBird])
+print(bird.name)  // Prints ""
+print(anotherBird.name)  // Prints ""
+
+

You can create custom value providers by registering values for types. See Providable for how +to provide "wildcard" instances for generic types.

+ +
var valueProvider = ValueProvider(from: .standardProvider)
+valueProvider.register("Ryan", for: String.self)
+
+useDefaultValues(from: valueProvider, on: [bird, anotherBird])
+
+print(bird.name)  // Prints "Ryan"
+print(anotherBird.name)  // Prints "Ryan"
+
+

Values from concrete stubs always have a higher precedence than default values.

+ +
given(bird.getName()) ~> "Ryan"
+print(bird.name)  // Prints "Ryan"
+
+useDefaultValues(from: .standardProvider, on: [bird, anotherBird])
+
+print(bird.name)  // Prints "Ryan"
+print(anotherBird.name)  // Prints ""
+
+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
value​ProviderValue​Provider

A value provider to add.

+
mocks[Mock]

A list of mocks that should start using the value provider.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/0.15.0/verify(_:file:line:)-a722fba/index.html b/docs/0.15.0/verify(_:file:line:)-a722fba/index.html new file mode 100755 index 00000000..a667de79 --- /dev/null +++ b/docs/0.15.0/verify(_:file:line:)-a722fba/index.html @@ -0,0 +1,87 @@ + + + + + + Mockingbird - verify(_:file:line:) + + + +
+ + + Mockingbird + + Documentation + + 0.15.0 +
+ + + + + +
+
+

+Function +verify(_:​file:​line:​) +

+ +
public func verify<DeclarationType: Declaration, InvocationType, ReturnType>(_ declaration: Mockable<DeclarationType, InvocationType, ReturnType>, file: StaticString = #file, line: UInt = #line) -> VerificationManager<InvocationType, ReturnType>
+
+

Verify that a mock recieved a specific invocation some number of times.

+ +
+
+

Verification lets you assert that a mock received a particular invocation during its lifetime.

+ +
verify(bird.doMethod()).wasCalled()
+verify(bird.getProperty()).wasCalled()
+verify(bird.setProperty(any())).wasCalled()
+
+

Match exact or wildcard argument values when verifying methods with parameters.

+ +
verify(bird.canChirp(volume: any())).wasCalled()     // Called with any volume
+verify(bird.canChirp(volume: notNil())).wasCalled()  // Called with any non-nil volume
+verify(bird.canChirp(volume: 10)).wasCalled()        // Called with volume = 10
+
+
+

Parameters

+ + + + + + + + + + + + + + + + +
mock

A mocked declaration to verify.

+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-beta.3. +

+
+ + diff --git a/docs/index.html b/docs/index.html index eba5609f..455d4259 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ - + diff --git a/docs/latest/index.html b/docs/latest/index.html index eba5609f..455d4259 100644 --- a/docs/latest/index.html +++ b/docs/latest/index.html @@ -1 +1 @@ - +