selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
3 lines • 8.58 kB
HTML
<meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>goog.testing.MockExpectation</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class goog.testing.MockExpectation</h1><a class="source" href="source/lib/goog/testing/mock.js.src.html#l55">code »</a></header><section><p>This is a class that represents an expectation.<h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">goog.testing.MockExpectation <span class="args">( name )</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>name: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The name of the method for this expectation.</dl></table></div></div></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="instance-methods"><h2>Instance Methods</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/mock.js.src.html#l132">code »</a><span class="member"><a name="addErrorMessage">addErrorMessage</a> <span class="args">( message )</span></span></div><p>Allow expectation failures to include messages.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The failure message.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/mock.js.src.html#l141">code »</a><span class="member"><a name="getErrorMessage">getErrorMessage</a> <span class="args">( )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Get the error messages seen so far.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>Error messages separated by \n.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/mock.js.src.html#l150">code »</a><span class="member"><a name="getErrorMessageCount">getErrorMessageCount</a> <span class="args">( )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Get how many error messages have been seen so far.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>Count of error messages.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mock.js.src.html#l109">code »</a><span class="member"><a name="actualCalls">actualCalls</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>The number of times this method is called by real code.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mock.js.src.html#l102">code »</a><span class="member"><a name="argumentList">argumentList</a> : <code class="type"><a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code></span></div><p>The arguments that are expected to be passed to this function</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mock.js.src.html#l66">code »</a><span class="member"><a name="errorMessages">errorMessages</a> : <code class="type"><a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code></span></div><p>An array of error messages for expectations not met.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mock.js.src.html#l95">code »</a><span class="member"><a name="exceptionToThrow">exceptionToThrow</a> : <code class="type">*</code></span></div><p>The value that will be thrown when the method is called</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mock.js.src.html#l81">code »</a><span class="member"><a name="maxCalls">maxCalls</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>The maximum number of times this method should be called.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mock.js.src.html#l74">code »</a><span class="member"><a name="minCalls">minCalls</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>The minimum number of times this method should be called.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mock.js.src.html#l60">code »</a><span class="member"><a name="name">name</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>The name of the method that is expected to be called.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mock.js.src.html#l88">code »</a><span class="member"><a name="returnValue">returnValue</a> : <code class="type">*</code></span></div><p>The value that this method should return.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mock.js.src.html#l125">code »</a><span class="member"><a name="toDo">toDo</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code></span></div><p>The function which will be executed when this method is called.
Method arguments will be passed to this function, and return value
of this function will be returned by the method.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/testing/mock.js.src.html#l116">code »</a><span class="member"><a name="verificationCalls">verificationCalls</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>The number of times this method is called during the verification phase.</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>