| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>DiffRepository (Calcite 1.21.0 Test API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="DiffRepository (Calcite 1.21.0 Test API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":10,"i1":10,"i2":10,"i3":9,"i4":10,"i5":10,"i6":10,"i7":9,"i8":9,"i9":10,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":10,"i16":9,"i17":10,"i18":10,"i19":9,"i20":9,"i21":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/DiffRepository.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.calcite.test</a></div> |
| <h2 title="Class DiffRepository" class="title">Class DiffRepository</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.calcite.test.DiffRepository</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <pre>public class <span class="typeNameLabel">DiffRepository</span> |
| extends java.lang.Object</pre> |
| <div class="block">A collection of resources used by tests. |
| |
| <p>Loads files containing test input and output into memory. If there are |
| differences, writes out a log file containing the actual output. |
| |
| <p>Typical usage is as follows. A test case class defines a method |
| |
| <blockquote><pre><code> |
| package com.acme.test; |
| |
| public class MyTest extends TestCase { |
| public DiffRepository getDiffRepos() { |
| return DiffRepository.lookup(MyTest.class); |
| } |
| |
| @Test public void testToUpper() { |
| getDiffRepos().assertEquals("${result}", "${string}"); |
| } |
| |
| @Test public void testToLower() { |
| getDiffRepos().assertEquals("Multi-line\nstring", "${string}"); |
| } |
| } |
| </code></pre></blockquote> |
| |
| <p>There is an accompanying reference file named after the class, |
| <code>src/test/resources/com/acme/test/MyTest.xml</code>:</p> |
| |
| <blockquote><pre><code> |
| <Root> |
| <TestCase name="testToUpper"> |
| <Resource name="string"> |
| <![CDATA[String to be converted to upper case]]> |
| </Resource> |
| <Resource name="result"> |
| <![CDATA[STRING TO BE CONVERTED TO UPPER CASE]]> |
| </Resource> |
| </TestCase> |
| <TestCase name="testToLower"> |
| <Resource name="result"> |
| <![CDATA[multi-line |
| string]]> |
| </Resource> |
| </TestCase> |
| </Root> |
| |
| </code></pre></blockquote> |
| |
| <p>If any of the test cases fails, a log file is generated, called |
| <code>target/surefire/com/acme/test/MyTest.xml</code>, containing the actual |
| output.</p> |
| |
| <p>(Maven sometimes removes this file; if it is not present, run maven with |
| an extra <code>-X</code> flag. |
| See <a href="http://jira.codehaus.org/browse/SUREFIRE-846">[SUREFIRE-846]</a> |
| for details.)</p> |
| |
| <p>The log |
| file is otherwise identical to the reference log, so once the log file has |
| been verified, it can simply be copied over to become the new reference |
| log:</p> |
| |
| <blockquote><code>cp target/surefire/com/acme/test/MyTest.xml |
| src/test/resources/com/acme/test/MyTest.xml</code></blockquote> |
| |
| <p>If a resource or test case does not exist, <code>DiffRepository</code> |
| creates them in the log file. Because DiffRepository is so forgiving, it is |
| very easy to create new tests and test cases.</p> |
| |
| <p>The <a href="#lookup(java.lang.Class)"><code>lookup(java.lang.Class)</code></a> method ensures that all test cases share the same |
| instance of the repository. This is important more than one one test case |
| fails. The shared instance ensures that the generated |
| <code>target/surefire/com/acme/test/MyTest.xml</code> |
| file contains the actual for <em>both</em> test cases.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DiffRepository.Filter.html" title="interface in org.apache.calcite.test">DiffRepository.Filter</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Callback to filter strings before returning them.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#baseRepository">baseRepository</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private org.w3c.dom.Document</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doc">doc</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private <a href="DiffRepository.Filter.html" title="interface in org.apache.calcite.test">DiffRepository.Filter</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#filter">filter</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#indent">indent</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private java.io.File</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#logFile">logFile</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static java.util.Map<java.lang.Class,​<a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MAP_CLASS_TO_REPOSITORY">MAP_CLASS_TO_REPOSITORY</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Holds one diff-repository per class.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#RESOURCE_NAME_ATTR">RESOURCE_NAME_ATTR</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#RESOURCE_TAG">RESOURCE_TAG</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private org.w3c.dom.Element</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#root">root</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ROOT_TAG">ROOT_TAG</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TEST_CASE_NAME_ATTR">TEST_CASE_NAME_ATTR</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TEST_CASE_OVERRIDES_ATTR">TEST_CASE_OVERRIDES_ATTR</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TEST_CASE_TAG">TEST_CASE_TAG</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier</th> |
| <th class="colSecond" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private </code></td> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.net.URL,java.io.File,org.apache.calcite.test.DiffRepository,org.apache.calcite.test.DiffRepository.Filter)">DiffRepository</a></span>​(java.net.URL refFile, |
| java.io.File logFile, |
| <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a> baseRepository, |
| <a href="DiffRepository.Filter.html" title="interface in org.apache.calcite.test">DiffRepository.Filter</a> filter)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a DiffRepository.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#amend(java.lang.String,java.lang.String)">amend</a></span>​(java.lang.String expected, |
| java.lang.String actual)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#assertEquals(java.lang.String,java.lang.String,java.lang.String)">assertEquals</a></span>​(java.lang.String tag, |
| java.lang.String expected, |
| java.lang.String actual)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#expand(java.lang.String,java.lang.String)">expand</a></span>​(java.lang.String tag, |
| java.lang.String text)</code></th> |
| <td class="colLast"> |
| <div class="block">Expands a string containing one or more variables.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>private static java.net.URL</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#findFile(java.lang.Class,java.lang.String)">findFile</a></span>​(java.lang.Class clazz, |
| java.lang.String suffix)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>private void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flushDoc()">flushDoc</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Flushes the reference document to the file system.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>private java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#get(java.lang.String,java.lang.String)">get</a></span>​(java.lang.String testCaseName, |
| java.lang.String resourceName)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a given resource from a given test case.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>private java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCurrentTestCaseName(boolean)">getCurrentTestCaseName</a></span>​(boolean fail)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the name of the current test case by looking up the call stack for |
| a method whose name starts with "test", for example "testFoo".</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>private static org.w3c.dom.Element</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getResourceElement(org.w3c.dom.Element,java.lang.String)">getResourceElement</a></span>​(org.w3c.dom.Element testCaseElement, |
| java.lang.String resourceName)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a given resource from a given test case.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>private static org.w3c.dom.Element</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getResourceElement(org.w3c.dom.Element,java.lang.String,boolean)">getResourceElement</a></span>​(org.w3c.dom.Element testCaseElement, |
| java.lang.String resourceName, |
| boolean killYoungerSiblings)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a given resource from a given test case.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>private org.w3c.dom.Element</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTestCaseElement(java.lang.String,boolean,java.util.List)">getTestCaseElement</a></span>​(java.lang.String testCaseName, |
| boolean checkOverride, |
| java.util.List<org.apache.calcite.util.Pair<java.lang.String,​org.w3c.dom.Element>> elements)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the <TestCase> element corresponding to the current test |
| case.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>private static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getText(org.w3c.dom.Element)">getText</a></span>​(org.w3c.dom.Element element)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the text under an element.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>private static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isWhitespace(java.lang.String)">isWhitespace</a></span>​(java.lang.String text)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lookup(java.lang.Class)">lookup</a></span>​(java.lang.Class clazz)</code></th> |
| <td class="colLast"> |
| <div class="block">Finds the repository instance for a given class, with no base |
| repository or filter.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lookup(java.lang.Class,org.apache.calcite.test.DiffRepository)">lookup</a></span>​(java.lang.Class clazz, |
| <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a> baseRepository)</code></th> |
| <td class="colLast"> |
| <div class="block">Finds the repository instance for a given class and inheriting from |
| a given repository.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lookup(java.lang.Class,org.apache.calcite.test.DiffRepository,org.apache.calcite.test.DiffRepository.Filter)">lookup</a></span>​(java.lang.Class clazz, |
| <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a> baseRepository, |
| <a href="DiffRepository.Filter.html" title="interface in org.apache.calcite.test">DiffRepository.Filter</a> filter)</code></th> |
| <td class="colLast"> |
| <div class="block">Finds the repository instance for a given class.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>private org.w3c.dom.Node</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ref(java.lang.String,java.util.List)">ref</a></span>​(java.lang.String testCaseName, |
| java.util.List<org.apache.calcite.util.Pair<java.lang.String,​org.w3c.dom.Element>> map)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>private static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeAllChildren(org.w3c.dom.Element)">removeAllChildren</a></span>​(org.w3c.dom.Element element)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#set(java.lang.String,java.lang.String)">set</a></span>​(java.lang.String resourceName, |
| java.lang.String value)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the value of a given resource of the current test case.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>private void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#update(java.lang.String,java.lang.String,java.lang.String)">update</a></span>​(java.lang.String testCaseName, |
| java.lang.String resourceName, |
| java.lang.String value)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new document with a given resource.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>private static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#validate(org.w3c.dom.Element)">validate</a></span>​(org.w3c.dom.Element root)</code></th> |
| <td class="colLast"> |
| <div class="block">Validates the root element.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>private static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#write(org.w3c.dom.Document,java.io.Writer,int)">write</a></span>​(org.w3c.dom.Document doc, |
| java.io.Writer w, |
| int indent)</code></th> |
| <td class="colLast"> |
| <div class="block">Serializes an XML document as text.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>private static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeNode(org.w3c.dom.Node,org.apache.calcite.util.XmlOutput)">writeNode</a></span>​(org.w3c.dom.Node node, |
| org.apache.calcite.util.XmlOutput out)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="ROOT_TAG"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ROOT_TAG</h4> |
| <pre>private static final java.lang.String ROOT_TAG</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.calcite.test.DiffRepository.ROOT_TAG">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="TEST_CASE_TAG"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>TEST_CASE_TAG</h4> |
| <pre>private static final java.lang.String TEST_CASE_TAG</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.calcite.test.DiffRepository.TEST_CASE_TAG">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="TEST_CASE_NAME_ATTR"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>TEST_CASE_NAME_ATTR</h4> |
| <pre>private static final java.lang.String TEST_CASE_NAME_ATTR</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.calcite.test.DiffRepository.TEST_CASE_NAME_ATTR">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="TEST_CASE_OVERRIDES_ATTR"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>TEST_CASE_OVERRIDES_ATTR</h4> |
| <pre>private static final java.lang.String TEST_CASE_OVERRIDES_ATTR</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.calcite.test.DiffRepository.TEST_CASE_OVERRIDES_ATTR">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="RESOURCE_TAG"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>RESOURCE_TAG</h4> |
| <pre>private static final java.lang.String RESOURCE_TAG</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.calcite.test.DiffRepository.RESOURCE_TAG">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="RESOURCE_NAME_ATTR"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>RESOURCE_NAME_ATTR</h4> |
| <pre>private static final java.lang.String RESOURCE_NAME_ATTR</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.calcite.test.DiffRepository.RESOURCE_NAME_ATTR">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="MAP_CLASS_TO_REPOSITORY"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>MAP_CLASS_TO_REPOSITORY</h4> |
| <pre>private static final java.util.Map<java.lang.Class,​<a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a>> MAP_CLASS_TO_REPOSITORY</pre> |
| <div class="block">Holds one diff-repository per class. It is necessary for all test cases in |
| the same class to share the same diff-repository: if the repository gets |
| loaded once per test case, then only one diff is recorded.</div> |
| </li> |
| </ul> |
| <a id="baseRepository"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>baseRepository</h4> |
| <pre>private final <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a> baseRepository</pre> |
| </li> |
| </ul> |
| <a id="indent"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>indent</h4> |
| <pre>private final int indent</pre> |
| </li> |
| </ul> |
| <a id="doc"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doc</h4> |
| <pre>private org.w3c.dom.Document doc</pre> |
| </li> |
| </ul> |
| <a id="root"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>root</h4> |
| <pre>private final org.w3c.dom.Element root</pre> |
| </li> |
| </ul> |
| <a id="logFile"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>logFile</h4> |
| <pre>private final java.io.File logFile</pre> |
| </li> |
| </ul> |
| <a id="filter"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>filter</h4> |
| <pre>private final <a href="DiffRepository.Filter.html" title="interface in org.apache.calcite.test">DiffRepository.Filter</a> filter</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>(java.net.URL,java.io.File,org.apache.calcite.test.DiffRepository,org.apache.calcite.test.DiffRepository.Filter)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>DiffRepository</h4> |
| <pre>private DiffRepository​(java.net.URL refFile, |
| java.io.File logFile, |
| <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a> baseRepository, |
| <a href="DiffRepository.Filter.html" title="interface in org.apache.calcite.test">DiffRepository.Filter</a> filter)</pre> |
| <div class="block">Creates a DiffRepository.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>refFile</code> - Reference file</dd> |
| <dd><code>logFile</code> - Log file</dd> |
| <dd><code>baseRepository</code> - Parent repository or null</dd> |
| <dd><code>filter</code> - Filter or null</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="findFile(java.lang.Class,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findFile</h4> |
| <pre class="methodSignature">private static java.net.URL findFile​(java.lang.Class clazz, |
| java.lang.String suffix)</pre> |
| </li> |
| </ul> |
| <a id="expand(java.lang.String,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>expand</h4> |
| <pre class="methodSignature">public java.lang.String expand​(java.lang.String tag, |
| java.lang.String text)</pre> |
| <div class="block">Expands a string containing one or more variables. (Currently only works |
| if there is one variable.)</div> |
| </li> |
| </ul> |
| <a id="set(java.lang.String,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>set</h4> |
| <pre class="methodSignature">public void set​(java.lang.String resourceName, |
| java.lang.String value)</pre> |
| <div class="block">Sets the value of a given resource of the current test case.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>resourceName</code> - Name of the resource, e.g. "sql"</dd> |
| <dd><code>value</code> - Value of the resource</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="amend(java.lang.String,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>amend</h4> |
| <pre class="methodSignature">public void amend​(java.lang.String expected, |
| java.lang.String actual)</pre> |
| </li> |
| </ul> |
| <a id="get(java.lang.String,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>get</h4> |
| <pre class="methodSignature">private java.lang.String get​(java.lang.String testCaseName, |
| java.lang.String resourceName)</pre> |
| <div class="block">Returns a given resource from a given test case.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>testCaseName</code> - Name of test case, e.g. "testFoo"</dd> |
| <dd><code>resourceName</code> - Name of resource, e.g. "sql", "plan"</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The value of the resource, or null if not found</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getText(org.w3c.dom.Element)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getText</h4> |
| <pre class="methodSignature">private static java.lang.String getText​(org.w3c.dom.Element element)</pre> |
| <div class="block">Returns the text under an element.</div> |
| </li> |
| </ul> |
| <a id="getTestCaseElement(java.lang.String,boolean,java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTestCaseElement</h4> |
| <pre class="methodSignature">private org.w3c.dom.Element getTestCaseElement​(java.lang.String testCaseName, |
| boolean checkOverride, |
| java.util.List<org.apache.calcite.util.Pair<java.lang.String,​org.w3c.dom.Element>> elements)</pre> |
| <div class="block">Returns the <TestCase> element corresponding to the current test |
| case.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>testCaseName</code> - Name of test case</dd> |
| <dd><code>checkOverride</code> - Make sure that if an element overrides an element in |
| a base repository, it has overrides="true"</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>TestCase element, or null if not found</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getCurrentTestCaseName(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCurrentTestCaseName</h4> |
| <pre class="methodSignature">private java.lang.String getCurrentTestCaseName​(boolean fail)</pre> |
| <div class="block">Returns the name of the current test case by looking up the call stack for |
| a method whose name starts with "test", for example "testFoo".</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fail</code> - Whether to fail if no method is found</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Name of current test case, or null if not found</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="assertEquals(java.lang.String,java.lang.String,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>assertEquals</h4> |
| <pre class="methodSignature">public void assertEquals​(java.lang.String tag, |
| java.lang.String expected, |
| java.lang.String actual)</pre> |
| </li> |
| </ul> |
| <a id="update(java.lang.String,java.lang.String,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>update</h4> |
| <pre class="methodSignature">private void update​(java.lang.String testCaseName, |
| java.lang.String resourceName, |
| java.lang.String value)</pre> |
| <div class="block">Creates a new document with a given resource. |
| |
| <p>This method is synchronized, in case two threads are running test |
| cases of this test at the same time.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>testCaseName</code> - Test case name</dd> |
| <dd><code>resourceName</code> - Resource name</dd> |
| <dd><code>value</code> - New value of resource</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="ref(java.lang.String,java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ref</h4> |
| <pre class="methodSignature">private org.w3c.dom.Node ref​(java.lang.String testCaseName, |
| java.util.List<org.apache.calcite.util.Pair<java.lang.String,​org.w3c.dom.Element>> map)</pre> |
| </li> |
| </ul> |
| <a id="flushDoc()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>flushDoc</h4> |
| <pre class="methodSignature">private void flushDoc()</pre> |
| <div class="block">Flushes the reference document to the file system.</div> |
| </li> |
| </ul> |
| <a id="validate(org.w3c.dom.Element)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>validate</h4> |
| <pre class="methodSignature">private static void validate​(org.w3c.dom.Element root)</pre> |
| <div class="block">Validates the root element.</div> |
| </li> |
| </ul> |
| <a id="getResourceElement(org.w3c.dom.Element,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getResourceElement</h4> |
| <pre class="methodSignature">private static org.w3c.dom.Element getResourceElement​(org.w3c.dom.Element testCaseElement, |
| java.lang.String resourceName)</pre> |
| <div class="block">Returns a given resource from a given test case.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>testCaseElement</code> - The enclosing TestCase element, e.g. <code> |
| <TestCase name="testFoo"></code>.</dd> |
| <dd><code>resourceName</code> - Name of resource, e.g. "sql", "plan"</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The value of the resource, or null if not found</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getResourceElement(org.w3c.dom.Element,java.lang.String,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getResourceElement</h4> |
| <pre class="methodSignature">private static org.w3c.dom.Element getResourceElement​(org.w3c.dom.Element testCaseElement, |
| java.lang.String resourceName, |
| boolean killYoungerSiblings)</pre> |
| <div class="block">Returns a given resource from a given test case.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>testCaseElement</code> - The enclosing TestCase element, e.g. <code> |
| <TestCase name="testFoo"></code>.</dd> |
| <dd><code>resourceName</code> - Name of resource, e.g. "sql", "plan"</dd> |
| <dd><code>killYoungerSiblings</code> - Whether to remove resources with the same |
| name and the same parent that are eclipsed</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The value of the resource, or null if not found</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="removeAllChildren(org.w3c.dom.Element)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>removeAllChildren</h4> |
| <pre class="methodSignature">private static void removeAllChildren​(org.w3c.dom.Element element)</pre> |
| </li> |
| </ul> |
| <a id="write(org.w3c.dom.Document,java.io.Writer,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>write</h4> |
| <pre class="methodSignature">private static void write​(org.w3c.dom.Document doc, |
| java.io.Writer w, |
| int indent)</pre> |
| <div class="block">Serializes an XML document as text. |
| |
| <p>FIXME: I'm sure there's a library call to do this, but I'm danged if I |
| can find it. -- jhyde, 2006/2/9.</div> |
| </li> |
| </ul> |
| <a id="writeNode(org.w3c.dom.Node,org.apache.calcite.util.XmlOutput)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeNode</h4> |
| <pre class="methodSignature">private static void writeNode​(org.w3c.dom.Node node, |
| org.apache.calcite.util.XmlOutput out)</pre> |
| </li> |
| </ul> |
| <a id="isWhitespace(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isWhitespace</h4> |
| <pre class="methodSignature">private static boolean isWhitespace​(java.lang.String text)</pre> |
| </li> |
| </ul> |
| <a id="lookup(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>lookup</h4> |
| <pre class="methodSignature">public static <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a> lookup​(java.lang.Class clazz)</pre> |
| <div class="block">Finds the repository instance for a given class, with no base |
| repository or filter.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>clazz</code> - Test case class</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The diff repository shared between test cases in this class.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="lookup(java.lang.Class,org.apache.calcite.test.DiffRepository)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>lookup</h4> |
| <pre class="methodSignature">public static <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a> lookup​(java.lang.Class clazz, |
| <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a> baseRepository)</pre> |
| <div class="block">Finds the repository instance for a given class and inheriting from |
| a given repository.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>clazz</code> - Test case class</dd> |
| <dd><code>baseRepository</code> - Base class of test class</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The diff repository shared between test cases in this class.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="lookup(java.lang.Class,org.apache.calcite.test.DiffRepository,org.apache.calcite.test.DiffRepository.Filter)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>lookup</h4> |
| <pre class="methodSignature">public static <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a> lookup​(java.lang.Class clazz, |
| <a href="DiffRepository.html" title="class in org.apache.calcite.test">DiffRepository</a> baseRepository, |
| <a href="DiffRepository.Filter.html" title="interface in org.apache.calcite.test">DiffRepository.Filter</a> filter)</pre> |
| <div class="block">Finds the repository instance for a given class. |
| |
| <p>It is important that all test cases in a class share the same |
| repository instance. This ensures that, if two or more test cases fail, |
| the log file will contains the actual results of both test cases. |
| |
| <p>The <code>baseRepository</code> parameter is useful if the test is an |
| extension to a previous test. If the test class has a base class which |
| also has a repository, specify the repository here. DiffRepository will |
| look for resources in the base class if it cannot find them in this |
| repository. If test resources from test cases in the base class are |
| missing or incorrect, it will not write them to the log file -- you |
| probably need to fix the base test. |
| |
| <p>Use the <code>filter</code> parameter if you expect the test to |
| return results slightly different than in the repository. This happens |
| if the behavior of a derived test is slightly different than a base |
| test. If you do not specify a filter, no filtering will happen.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>clazz</code> - Test case class</dd> |
| <dd><code>baseRepository</code> - Base repository</dd> |
| <dd><code>filter</code> - Filters each string returned by the repository</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The diff repository shared between test cases in this class.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/DiffRepository.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2012–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |