selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
9 lines • 9.97 kB
HTML
<meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>goog.testing.mockmatchers</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Namespace goog.testing.mockmatchers</h1><a class="source" href="source/lib/goog/testing/mockmatchers.js.src.html#l25">code »</a></header><section></section><section><h2>Classes</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="class_goog_testing_mockmatchers_ArgumentMatcher.html">goog.testing.mockmatchers.ArgumentMatcher</a><dd>A simple interface for executing argument matching.<dt><a href="class_goog_testing_mockmatchers_IgnoreArgument.html">goog.testing.mockmatchers.IgnoreArgument</a><dd>A matcher that always returns true.<dt><a href="class_goog_testing_mockmatchers_InstanceOf.html">goog.testing.mockmatchers.InstanceOf</a><dd>A matcher that verifies that an argument is an instance of a given class.<dt><a href="class_goog_testing_mockmatchers_ObjectEquals.html">goog.testing.mockmatchers.ObjectEquals</a><dd>A matcher that verifies that the argument is an object that equals the given
expected object, using a deep comparison.<dt><a href="class_goog_testing_mockmatchers_RegexpMatch.html">goog.testing.mockmatchers.RegexpMatch</a><dd>A matcher that verifies that an argument matches a given RegExp.<dt><a href="class_goog_testing_mockmatchers_SaveArgument.html">goog.testing.mockmatchers.SaveArgument</a><dd>A matcher that saves the argument that it is verifying so that your unit test
can perform extra tests with this argument later.<dt><a href="class_goog_testing_mockmatchers_TypeOf.html">goog.testing.mockmatchers.TypeOf</a><dd>A matcher that verifies that an argument is of a given type (e.g.</dl></table></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="static-functions"><h2>Global Functions</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/mockmatchers.js.src.html#l369">code »</a><span class="member"><a name="goog.testing.mockmatchers.flexibleArrayMatcher">goog.testing.mockmatchers.flexibleArrayMatcher</a> <span class="args">( expectedArr, arr, opt_expectation )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>A function that checks to see if an array matches a given set of
expectations. The expectations array can be a mix of ArgumentMatcher
implementations and values. True will be returned if values are identical or
if a matcher returns a positive result.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>expectedArr: <code class="type"><a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code><dd>An array of expectations which can be either
values to check for equality or ArgumentMatchers.<dt>arr: <code class="type"><a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code><dd>The array to match.<dt>opt_expectation: <code class="type">?<a href="class_goog_testing_MockExpectation.html">goog.testing.MockExpectation</a>=</code><dd>The expectation
for this match.</dl><tr><th>Returns<tr><td><dl>Whether or not the given array matches the expectations.</dl></table></div></details></div></div></section><section id="static-properties"><h2>Global Properties</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mockmatchers.js.src.html#l271">code »</a><span class="member"><a name="goog.testing.mockmatchers.ignoreArgument">goog.testing.mockmatchers.ignoreArgument</a> : <code class="type"><a href="class_goog_testing_mockmatchers_IgnoreArgument.html">goog.testing.mockmatchers.IgnoreArgument</a></code></span></div><p>An instance of the IgnoreArgument matcher. Returns true for all matches.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mockmatchers.js.src.html#l279">code »</a><span class="member"><a name="goog.testing.mockmatchers.isArray">goog.testing.mockmatchers.isArray</a> : <code class="type"><a href="class_goog_testing_mockmatchers_ArgumentMatcher.html">goog.testing.mockmatchers.ArgumentMatcher</a></code></span></div><p>A matcher that verifies that an argument is an array.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mockmatchers.js.src.html#l289">code »</a><span class="member"><a name="goog.testing.mockmatchers.isArrayLike">goog.testing.mockmatchers.isArrayLike</a> : <code class="type"><a href="class_goog_testing_mockmatchers_ArgumentMatcher.html">goog.testing.mockmatchers.ArgumentMatcher</a></code></span></div><p>A matcher that verifies that an argument is a array-like. A NodeList is an
example of a collection that is very close to an array.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mockmatchers.js.src.html#l316">code »</a><span class="member"><a name="goog.testing.mockmatchers.isBoolean">goog.testing.mockmatchers.isBoolean</a> : <code class="type"><a href="class_goog_testing_mockmatchers_ArgumentMatcher.html">goog.testing.mockmatchers.ArgumentMatcher</a></code></span></div><p>A matcher that verifies that an argument is a boolean.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mockmatchers.js.src.html#l298">code »</a><span class="member"><a name="goog.testing.mockmatchers.isDateLike">goog.testing.mockmatchers.isDateLike</a> : <code class="type"><a href="class_goog_testing_mockmatchers_ArgumentMatcher.html">goog.testing.mockmatchers.ArgumentMatcher</a></code></span></div><p>A matcher that verifies that an argument is a date-like.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mockmatchers.js.src.html#l334">code »</a><span class="member"><a name="goog.testing.mockmatchers.isFunction">goog.testing.mockmatchers.isFunction</a> : <code class="type"><a href="class_goog_testing_mockmatchers_ArgumentMatcher.html">goog.testing.mockmatchers.ArgumentMatcher</a></code></span></div><p>A matcher that verifies that an argument is a function.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mockmatchers.js.src.html#l352">code »</a><span class="member"><a name="goog.testing.mockmatchers.isNodeLike">goog.testing.mockmatchers.isNodeLike</a> : <code class="type"><a href="class_goog_testing_mockmatchers_ArgumentMatcher.html">goog.testing.mockmatchers.ArgumentMatcher</a></code></span></div><p>A matcher that verifies that an argument is like a DOM node.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mockmatchers.js.src.html#l325">code »</a><span class="member"><a name="goog.testing.mockmatchers.isNumber">goog.testing.mockmatchers.isNumber</a> : <code class="type"><a href="class_goog_testing_mockmatchers_ArgumentMatcher.html">goog.testing.mockmatchers.ArgumentMatcher</a></code></span></div><p>A matcher that verifies that an argument is a number.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mockmatchers.js.src.html#l343">code »</a><span class="member"><a name="goog.testing.mockmatchers.isObject">goog.testing.mockmatchers.isObject</a> : <code class="type"><a href="class_goog_testing_mockmatchers_ArgumentMatcher.html">goog.testing.mockmatchers.ArgumentMatcher</a></code></span></div><p>A matcher that verifies that an argument is an object.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mockmatchers.js.src.html#l307">code »</a><span class="member"><a name="goog.testing.mockmatchers.isString">goog.testing.mockmatchers.isString</a> : <code class="type"><a href="class_goog_testing_mockmatchers_ArgumentMatcher.html">goog.testing.mockmatchers.ArgumentMatcher</a></code></span></div><p>A matcher that verifies that an argument is a string.</summary></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>Loading</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>Loading</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>Loading</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>