-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3214ab
commit 50feb5e
Showing
87 changed files
with
10,581 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Mockingbird - ArgumentCaptor</title> | ||
<link rel="stylesheet" type="text/css" href="/mockingbird/0.15.0/all.css" media="all" /> | ||
</head> | ||
<body> | ||
<header> | ||
<a href="/mockingbird/0.15.0"> | ||
<strong> | ||
Mockingbird | ||
</strong> | ||
<span>Documentation</span> | ||
</a> | ||
<sup>0.15.0</sup> | ||
</header> | ||
|
||
<!-- | ||
<form class="search"> | ||
<input type="search" placeholder="Search" /> | ||
</form> | ||
--> | ||
|
||
<nav> | ||
<div class="wrapper"> | ||
<h2>On This Page</h2> | ||
<ol><li><a href="#relationships">Relationships</a><ul><li><a href="#relationships">Superclass</a></li></ul></li><li><a href="#initializers">Initializers</a><ul><li class="initializer"><a href="#argumentcaptor.init(weak:)">init(weak:)</a></li></ul></li><li><a href="#properties">Properties</a><ul><li class="property"><a href="#argumentcaptor.matcher">matcher</a></li><li class="property"><a href="#argumentcaptor.allvalues">allValues</a></li><li class="property"><a href="#argumentcaptor.value">value</a></li></ul></li></ol> | ||
</div> | ||
</nav> | ||
|
||
<main> | ||
<article> | ||
<h1> | ||
<small>Class</small> | ||
<code class="name">ArgumentCaptor</code> | ||
</h1> | ||
|
||
<html><body><pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">class</span> <span class="type">ArgumentCaptor</span><<span class="variable">ParameterType</span>>: <a href="/mockingbird/0.15.0/ArgumentMatcher-f013d1a"><span class="type">ArgumentMatcher</span></a></code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>Captures method arguments passed during mock invocations.</p> | ||
|
||
</div> | ||
<div class="discussion"> | ||
<p>An argument captor extracts received argument values which can be used in other parts of the | ||
test.</p> | ||
|
||
<html><body><pre class="highlight"><code><span class="keyword">let</span> <span class="variable">bird</span> = <span class="variable">mock</span>(<span class="variable">Bird</span>.<span class="keyword">self</span>) | ||
<span class="variable">bird</span>.<span class="type">name</span> = <span class="string literal">"</span><span class="string literal">Ryan</span><span class="string literal">"</span> | ||
|
||
<span class="keyword">let</span> <span class="variable">nameCaptor</span> = <span class="variable">ArgumentCaptor</span><<span class="type">String</span>>() | ||
<span class="variable">verify</span>(<span class="variable">bird</span>.<span class="type">setName</span>(<span class="variable">nameCaptor</span>.<span class="type">matcher</span>)).<span class="type">wasCalled</span>() | ||
<span class="variable">print</span>(<span class="variable">nameCaptor</span>.<span class="type">value</span>) <span class="comment">// Prints "Ryan"</span> | ||
</code></pre></body></html> | ||
</div> | ||
<section id="relationships"> | ||
<h2 hidden>Relationships</h2> | ||
<figure> | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | ||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||
<!-- Generated by graphviz version 2.36.0 (20140111.2315) | ||
--> | ||
<!-- Title: %3 Pages: 1 --> | ||
<svg width="872pt" height="116pt" | ||
viewBox="0.00 0.00 872.00 116.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 112)"> | ||
<title>%3</title> | ||
<polygon fill="white" stroke="none" points="-4,4 -4,-112 868,-112 868,4 -4,4"/> | ||
<!-- ArgumentCaptor --> | ||
<g id="node1" class="node"><title>ArgumentCaptor</title> | ||
<g id="a_node1"><a xlink:href="/mockingbird/0.15.0/ArgumentCaptor-1017688" xlink:title="ArgumentCaptor"> | ||
<path fill="none" stroke="black" stroke-width="3" d="M528,-108C528,-108 336,-108 336,-108 330,-108 324,-102 324,-96 324,-96 324,-84 324,-84 324,-78 330,-72 336,-72 336,-72 528,-72 528,-72 534,-72 540,-78 540,-84 540,-84 540,-96 540,-96 540,-102 534,-108 528,-108"/> | ||
<text text-anchor="middle" x="432" y="-86.9484" font-family="Menlo" font-size="14.00">ArgumentCaptor</text> | ||
</a> | ||
</g> | ||
</g> | ||
<!-- ArgumentMatcher --> | ||
<g id="node2" class="node"><title>ArgumentMatcher</title> | ||
<path fill="none" stroke="black" d="M528,-36C528,-36 336,-36 336,-36 330,-36 324,-30 324,-24 324,-24 324,-12 324,-12 324,-6 330,-0 336,-0 336,-0 528,-0 528,-0 534,-0 540,-6 540,-12 540,-12 540,-24 540,-24 540,-30 534,-36 528,-36"/> | ||
<text text-anchor="middle" x="432" y="-14.9484" font-family="Menlo" font-size="14.00">ArgumentMatcher</text> | ||
</g> | ||
<!-- ArgumentCaptor->ArgumentMatcher --> | ||
<g id="edge1" class="edge"><title>ArgumentCaptor->ArgumentMatcher</title> | ||
<path fill="none" stroke="black" d="M432,-71.6966C432,-63.9827 432,-54.7125 432,-46.1124"/> | ||
<polygon fill="black" stroke="black" points="435.5,-46.1043 432,-36.1043 428.5,-46.1044 435.5,-46.1043"/> | ||
</g> | ||
</g> | ||
</svg> | ||
|
||
|
||
<figcaption hidden>Inheritance graph for ArgumentCaptor.</figcaption> | ||
</figure> | ||
<h3>Superclass</h3> | ||
<dl> | ||
<dt class="class"><code><a href="/mockingbird/0.15.0/ArgumentMatcher-f013d1a">ArgumentMatcher</a></code></dt> | ||
<dd><p>Matches argument values with a comparator.</p> | ||
</dd> | ||
</dl> | ||
</section> | ||
<section id="initializers"> | ||
<h2>Initializers</h2> | ||
|
||
<div role="article" class="initializer" id="argumentcaptor.init(weak:)"> | ||
<h3> | ||
<code>init(weak:)</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="keyword">public</span> <span class="keyword">init</span>(<span class="variable">weak</span>: <span class="type">Bool</span> = <span class="keyword">false</span>)</code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>Create a new argument captor.</p> | ||
|
||
</div> | ||
<h4>Parameters</h4> | ||
|
||
<table class="parameters"> | ||
<thead hidden> | ||
<tr> | ||
<th>Name</th> | ||
<th>Type</th> | ||
<th>Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<th>weak</th> | ||
<td><code class="type">Bool</code></td></td> | ||
<td><p>Whether captured arguments should be stored weakly.</p> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</section> | ||
<section id="properties"> | ||
<h2>Properties</h2> | ||
|
||
<div role="article" class="variable" id="argumentcaptor.matcher"> | ||
<h3> | ||
<code>matcher</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="keyword">var</span> <span class="variable">matcher</span>: <span class="type">ParameterType</span></code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>Passed as a parameter to mock verification contexts.</p> | ||
|
||
</div> | ||
</div> | ||
<div role="article" class="variable" id="argumentcaptor.allvalues"> | ||
<h3> | ||
<code>allValues</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="keyword">var</span> <span class="variable">allValues</span>: [<span class="type">ParameterType</span>]</code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>All recorded argument values.</p> | ||
|
||
</div> | ||
</div> | ||
<div role="article" class="variable" id="argumentcaptor.value"> | ||
<h3> | ||
<code>value</code> | ||
</h3> | ||
<html><body><pre class="highlight"><code><span class="keyword">var</span> <span class="variable">value</span>: <span class="type">ParameterType</span>?</code></pre></body></html> | ||
<div class="summary" role="doc-abstract"> | ||
<p>The last recorded argument value.</p> | ||
|
||
</div> | ||
</div> | ||
</section> | ||
|
||
|
||
|
||
</article> | ||
</main> | ||
|
||
<footer> | ||
<p> | ||
Generated on <time datetime="2020-08-12T14:19:42-0700">August 12, 2020</time> using <a href="https://github.com/SwiftDocOrg/swift-doc">swift-doc</a> <span class="version">1.0.0-beta.3</span>. | ||
</p> | ||
</footer> | ||
</body> | ||
</html> |
Oops, something went wrong.