| <h2> |
| <a href="http://github.com/onsi/gomega"> |
| <img src="images/gomega_small.png" class="img-responsive header_logo"> |
| </a> |
| </h2> |
| |
| <ul class="nav"> |
| <li> |
| <a href="#getting-gomega">Getting Gomega</a> |
| </li> |
| <li> |
| <a href="#using-gomega-with-ginkgo">Using Gomega With Ginkgo</a> |
| </li> |
| <li> |
| <a href="#using-gomega-with-golangs-xunit-style-tests">Using Gomega with XUnit Tests</a> |
| </li> |
| <li> |
| <a href="#making-assertions">Making Assertions</a> |
| <ul class="nav"> |
| <li> |
| <a href="#handling-errors">Handling Errors</a> |
| </li> |
| <li> |
| <a href="#annotating-assertions">Annotating Assertions</a> |
| </li> |
| <li> |
| <a href="#adjusting-output">Adjusting Output</a> |
| </li> |
| </ul> |
| </li> |
| <li> |
| <a href="#making-asynchronous-assertions">Making Asynchronous Assertions</a> |
| <ul class="nav"> |
| <li> |
| <a href="#eventually"><code>Eventually</code></a> |
| </li> |
| <li> |
| <a href="#consistently"><code>Consistently</code></a> |
| </li> |
| <li> |
| <a href="#modifying-default-intervals">Modifying Default Intervals</a> |
| </li> |
| </ul> |
| </li> |
| <li> |
| <a href="#making-assertions-in-helper-functions">Making Assertions in Helper Functions</a> |
| </li> |
| <li> |
| <a href="#provided-matchers">Provided Matchers</a> |
| <ul class="nav"> |
| <li> |
| <a href="#asserting-equivalence">Asserting Equivalence</a> |
| <ul class="nav"> |
| <li> |
| <a href="#equalexpected-interface"><code>Equal(...)</code></a> |
| </li> |
| <li> |
| <a href="#beequivalenttoexpected-interface"><code>BeEquivalentTo(...)</code></a> |
| </li> |
| <li> |
| <a href="#beidenticaltoexpected-interface"><code>BeIdenticalTo(...)</code></a> |
| </li> |
| <li> |
| <a href="#beassignabletotypeofexpected-interface"><code>BeAssignableToTypeOf(...)</code></a> |
| </li> |
| </ul> |
| </li> |
| |
| <li> |
| <a href="#asserting-presence">Asserting Presence</a> |
| <ul class="nav"> |
| <li> |
| <a href="#benil"><code>BeNil()</code></a> |
| </li> |
| <li> |
| <a href="#bezero"><code>BeZero()</code></a> |
| </li> |
| </ul> |
| </li> |
| |
| <li> |
| <a href="#asserting-truthiness">Asserting Truthiness</a> |
| <ul class="nav"> |
| <li> |
| <a href="#betrue"><code>BeTrue()</code></a> |
| </li> |
| <li> |
| <a href="#befalse"><code>BeFalse()</code></a> |
| </li> |
| </ul> |
| </li> |
| |
| <li> |
| <a href="#asserting-on-errors">Asserting on Errors</a> |
| <ul class="nav"> |
| <li> |
| <a href="#haveoccurred"><code>HaveOccurred()</code></a> |
| </li> |
| <li> |
| <a href="#succeed"><code>Succeed()</code></a> |
| </li> |
| <li> |
| <a href="#matcherrorexpected-interface"><code>MatchError(...)</code></a> |
| </li> |
| </ul> |
| </li> |
| |
| <li> |
| <a href="#working-with-channels">Working with Channels</a> |
| <ul class="nav"> |
| <li> |
| <a href="#beclosed"><code>BeClosed()</code></a> |
| </li> |
| <li> |
| <a href="#receive"><code>Receive()</code></a> |
| </li> |
| <li> |
| <a href="#besentvalue-interface"><code>BeSent(...)</code></a> |
| </li> |
| </ul> |
| </li> |
| |
| <li> |
| <a href="#working-with-files">Working with Files</a> |
| <ul class="nav"> |
| <li> |
| <a href="#beanexistingfile"><code>BeAnExistingFile()</code></a> |
| </li> |
| <li> |
| <a href="#bearegularfile"><code>BeARegularFile()</code></a> |
| </li> |
| <li> |
| <a href="#beadirectory"><code>BeADirectory</code></a> |
| </li> |
| </ul> |
| </li> |
| |
| <li> |
| <a href="#working-with-strings-json-and-yaml">Working with Strings, JSON and YAML</a> |
| <ul class="nav"> |
| <li> |
| <a href="#containsubstringsubstr-string-args-interface"><code>ContainSubstring(...)</code></a> |
| </li> |
| <li> |
| <a href="#haveprefixprefix-string-args-interfacee"><code>HavePrefix(...)</code></a> |
| </li> |
| <li> |
| <a href="#havesuffixsuffix-string-args-interface"><code>HaveSuffix(...)</code></a> |
| </li> |
| <li> |
| <a href="#matchregexpregexp-string-args-interface"><code>MatchRegexp(...)</code></a> |
| </li> |
| <li> |
| <a href="#matchjsonjson-interface"><code>MatchJSON(...)</code></a> |
| </li> |
| <li> |
| <a href="#matchyamlyaml-interface"><code>MatchYAML(...)</code></a> |
| </li> |
| </ul> |
| </li> |
| |
| <li> |
| <a href="#working-with-collections">Working with Collections</a> |
| <ul class="nav"> |
| <li> |
| <a href="#beempty"><code>BeEmpty()</code></a> |
| </li> |
| <li> |
| <a href="#havelencount-int"><code>HaveLen(...)</code></a> |
| </li> |
| <li> |
| <a href="#havecapcount-int"><code>HaveCap(...)</code></a> |
| </li> |
| <li> |
| <a href="#containelementelement-interface"><code>ContainElement(...)</code></a> |
| </li> |
| <li> |
| <a href="#consistofelement-interface"><code>ConsistOf(...)</code></a> |
| </li> |
| <li> |
| <a href="#havekeykey-interface"><code>HaveKey(...)</code></a> |
| </li> |
| <li> |
| <a href="#havekeywithvaluekey-interface-value-interface"><code>HaveKeyWithValue(...)</code></a> |
| </li> |
| </ul> |
| </li> |
| |
| <li> |
| <a href="#working-with-collections">Working with Numbers and Times</a> |
| <ul class="nav"> |
| <li> |
| <a href="#benumericallycomparator-string-compareto-interface"><code>BeNumerically(...)</code></a> |
| </li> |
| <li> |
| <a href="#betemporallycomparator-string-compareto-timetime-threshold-timeduration"><code>BeTemporally(...)</code></a> |
| </li> |
| </ul> |
| </li> |
| |
| <li> |
| <a href="#asserting-on-panics">Asserting on Panics</a> |
| <ul class="nav"> |
| <li> |
| <a href="#panic"><code>Panic()</code></a> |
| </li> |
| </ul> |
| </li> |
| |
| <li> |
| <a href="#composing-matchers">Composing Matchers</a> |
| <ul class="nav"> |
| <li> |
| <a href="#andmatchers-gomegamatcher"><code>And(...)</code> / <code>SatisfyAll(...)</code></a> |
| </li> |
| <li> |
| <a href="#ormatchers-gomegamatcher"><code>Or(...)</code> / <code>SatisfyAny(...)</code></a> |
| </li> |
| <li> |
| <a href="#notmatcher-gomegamatcher"><code>Not(...)</code></a> |
| </li> |
| <li> |
| <a href="#withtransformtransform-interface-matcher-gomegamatcher"><code>WithTransform(...)</code></a> |
| </li> |
| </ul> |
| </li> |
| |
| </ul> |
| </li> |
| <li> |
| <a href="#adding-your-own-matchers">Custom Matchers</a> |
| <ul class="nav"> |
| <li> |
| <a href="#a-custom-matcher-representjsonifiedobjectexpected-interface">An Example</a> |
| </li> |
| <li> |
| <a href="#aborting-eventuallyconsistently">Aborting Eventually/Consistently</a> |
| </li> |
| <li> |
| <a href="#contributing-to-gomega">Contributing to Gomega</a> |
| </li> |
| </ul> |
| </li> |
| <li> |
| <a href="#ghttp-testing-http-clients"><code>ghttp</code>: Testing HTTP Clients</a> |
| </li> |
| <li> |
| <a href="#gbytes-testing-streaming-buffers"><code>gbytes</code>: Testing Streaming Buffers |
| </a> |
| </li> |
| <li> |
| <a href="#gexec-testing-external-processes"><code>gexec</code>: Testing External Processes |
| </a> |
| </li> |
| <li> |
| <a href="#gstruct-testing-complex-data-types"><code>gstruct</code>: Testing Complex Data Types |
| </a> |
| </li> |
| </ul> |