Permalink
Browse files

docs

  • Loading branch information...
1 parent 62b51d9 commit d1ad2f175131e202ef8a32a8cebb8cbb89eebb32 @jediwhale committed Dec 24, 2011
@@ -14,7 +14,9 @@
<body>
<div class="topbar"><a href="../FitSharp.html" class="siteid"><i>fit</i>Sharp</a></div>
<div class="pagename">Clear Symbols Fixture</div>
-<div class="content">The ClearSymbols fixture erases all <a href="../Fit/SymbolValues.html">Symbol Values</a>.<br>
+<div class="content"><i>Obsolete: </i>Use <a href="../Fit/ConfigureFixture.html">Configure Fixture</a> - configure symbols clear<br>
+<br>
+The ClearSymbols fixture erases all <a href="../Fit/SymbolValues.html">Symbol Values</a>.<br>
<br>
<table border="1" cellpadding="2" cellspacing="0">
<tr><td>story test fixture</td></tr>
@@ -18,7 +18,7 @@
<br>
The logging facility can capture an execution trace of the core <span style="font-family:verdana,sans-serif"><i>fit</i>Sharp</span> engine and display it. In its present form it is probably mostly useful to <span style="font-family:verdana,sans-serif"><i>fit</i>Sharp</span> framework developers only. We can issue these commands:<ul><li>configure logging start</li><li>configure logging stop</li><li>configure logging show </li></ul><span style="font-size:larger; font-family:Arial,sans-serif; font-weight:bold; font-style:italic; color:navy;">Symbols</span><br>
<br>
-We can set and display <a href="../Fit/SymbolValues.html">Symbol Values</a>.<br>
+We can set, display and clear <a href="../Fit/SymbolValues.html">Symbol Values</a>.<br>
<br>
<table border="1" cellpadding="2" cellspacing="0">
<tr><td>when test is</td><td><br>
@@ -29,13 +29,29 @@
<table border="1" cellpadding="2" cellspacing="0">
<tr><td>configure</td><td>symbols</td><td>get value</td><td>mysymbol</td></tr>
</table>
+<br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>configure</td><td>symbols</td><td>clear</td></tr>
+</table>
+<br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>configure</td><td>symbols</td><td>has value</td><td>mysymbol</td></tr>
+</table>
</td><td>then result is</td><td><br>
<table border="1" cellpadding="2" cellspacing="0">
<tr><td>configure</td><td>symbols</td><td>save</td><td>mysymbol</td><td>value of System.String</td><td>myvalue</td></tr>
</table>
<br>
<table border="1" cellpadding="2" cellspacing="0">
<tr><td>configure</td><td>symbols</td><td>get value<span><a href="javascript:void(0)" onclick="this.parentNode.nextSibling.style.display=this.parentNode.nextSibling.style.display=='none'?'':'none'">&#8659;</a></span><div style="display:none"><div class="fit_extension">myvalue</div></div></td><td>mysymbol</td></tr>
+</table>
+<br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>configure</td><td>symbols</td><td>clear</td></tr>
+</table>
+<br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>configure</td><td>symbols</td><td>has value<span><a href="javascript:void(0)" onclick="this.parentNode.nextSibling.style.display=this.parentNode.nextSibling.style.display=='none'?'':'none'">&#8659;</a></span><div style="display:none"><div class="fit_extension">False</div></div></td><td>mysymbol</td></tr>
</table></td></tr>
</table>
</div>
@@ -16,7 +16,7 @@
<div class="pagename">Feature List</div>
<div class="content">(an incomplete list)<br>
<br>
-This is a specification that describes what <span style="font-family:verdana,sans-serif"><i>fit</i>Sharp</span> Fit can do. This is a work in progress that is being enhanced with each release.<ul><li><a href="../Fit/ArrayFixture.html">Array Fixture</a></li><li><a href="../Fit/ClearSymbolsFixture.html">Clear Symbols Fixture</a></li><li><a href="../Fit/ColumnFixture.html">Column Fixture</a></li><li><a href="../Fit/CommentFixture.html">Comment Fixture</a></li><li><a href="../Fit/ComputeFixture.html">Compute Fixture</a></li><li><a href="../Fit/ConfigureFixture.html">Configure Fixture</a></li><li><a href="../Fit/DefineFixture.html">Define Fixture</a></li><li><a href="../Fit/FitVersionFixture.html">Fit Version Fixture</a></li><li><a href="../Fit/FlowFixtureKeywords.html">Flow Fixture Keywords</a></li><li><a href="../Fit/GridFixture.html">Grid Fixture</a></li><li><a href="../Fit/ImportFixture.html">Import Fixture</a></li><li><a href="../Fit/IncludeFixture.html">Include Fixture</a></li><li><a href="../Fit/RowFixture.html">Row Fixture</a></li><li><a href="../Fit/UseFixture.html">Use Fixture</a></li></ul><ul><li><a href="../Fit/AbandonStoryTest.html">Abandon Story Test</a></li><li><a href="../Fit/CellDifferences.html">Cell Differences</a></li><li><a href="../Fit/CellHandlers.html">Cell Handlers</a> now known as <a href="../Fit/CellOperators.html">Cell Operators</a></li><li><a href="../Fit/CellMatching.html">Cell Matching</a></li><li><a href="../Fit/DomainAdapter.html">Domain Adapter</a></li><li><a href="../Fit/FixtureArguments.html">Fixture Arguments</a></li><li><a href="../Fit/FlowMode.html">Flow Mode</a></li><li><a href="../Fit/FolderRunner.html">Folder Runner</a></li><li><a href="../Fit/GracefulNames.html">Graceful Names</a></li><li><a href="../Fit/NumericComparisonOperators.html">Numeric Comparison Operators</a></li><li><a href="../Fit/StoryTestExecution.html">Story Test Execution</a></li><li><a href="../Fit/SymbolValues.html">Symbol Values</a></li><li><a href="../FitSharp/SuiteConfigurationFile.html">Suite Configuration File</a></li><li><a href="../Fit/SystemUnderTest.html">System Under Test</a></li><li><a href="../Fit/TestRunner.html">Test Runner</a></li><li><a href="../Fit/TreeValues.html">Tree Values</a></li></ul><br>
+This is a specification that describes what <span style="font-family:verdana,sans-serif"><i>fit</i>Sharp</span> Fit can do. This is a work in progress that is being enhanced with each release.<ul><li><a href="../Fit/ArrayFixture.html">Array Fixture</a></li><li><a href="../Fit/ClearSymbolsFixture.html">Clear Symbols Fixture</a></li><li><a href="../Fit/ColumnFixture.html">Column Fixture</a></li><li><a href="../Fit/CommentFixture.html">Comment Fixture</a></li><li><a href="../Fit/ComputeFixture.html">Compute Fixture</a></li><li><a href="../Fit/ConfigureFixture.html">Configure Fixture</a></li><li><a href="../Fit/DefineFixture.html">Define Fixture</a></li><li><a href="../Fit/FitVersionFixture.html">Fit Version Fixture</a></li><li><a href="../Fit/FlowFixtureKeywords.html">Flow Fixture Keywords</a></li><li><a href="../Fit/GridFixture.html">Grid Fixture</a></li><li><a href="../Fit/ImportFixture.html">Import Fixture</a></li><li><a href="../Fit/IncludeFixture.html">Include Fixture</a></li><li><a href="../Fit/RowFixture.html">Row Fixture</a></li><li><a href="../Fit/UseFixture.html">Use Fixture</a></li></ul><ul><li><a href="../Fit/AbandonStoryTest.html">Abandon Story Test</a></li><li><a href="../Fit/CellDifferences.html">Cell Differences</a></li><li><a href="../Fit/CellHandlers.html">Cell Handlers</a> now known as <a href="../Fit/CellOperators.html">Cell Operators</a></li><li><a href="../Fit/CellMatching.html">Cell Matching</a></li><li><a href="../Fit/DomainAdapter.html">Domain Adapter</a></li><li><a href="../Fit/FixtureArguments.html">Fixture Arguments</a></li><li><a href="../Fit/FlowMode.html">Flow Mode</a></li><li><a href="../Fit/FolderRunner.html">Folder Runner</a></li><li><a href="../Fit/GracefulNames.html">Graceful Names</a></li><li><a href="../Fit/MethodExecution.html">Method Execution</a></li><li><a href="../Fit/NumericComparisonOperators.html">Numeric Comparison Operators</a></li><li><a href="../Fit/StoryTestExecution.html">Story Test Execution</a></li><li><a href="../Fit/SymbolValues.html">Symbol Values</a></li><li><a href="../FitSharp/SuiteConfigurationFile.html">Suite Configuration File</a></li><li><a href="../Fit/SystemUnderTest.html">System Under Test</a></li><li><a href="../Fit/TestRunner.html">Test Runner</a></li><li><a href="../Fit/TreeValues.html">Tree Values</a></li></ul><br>
</div>
<div style="width:100%;text-align:right">
<span class="footer">&copy; Copyright <a href="http://www.syterra.com">Syterra Software Inc.</a> All rights reserved.</span>
@@ -16,7 +16,7 @@
<div class="pagename">Flow Mode</div>
<div class="content">In <a href="../Fit/FlowMode.html">Flow Mode</a>, a fixture processes all the tables in the story test, without repeating the fixture name in the first row of each table.<br>
<br>
-Each row is interpreted as one of the following.<ul><li>One of the standard <a href="../Fit/FlowFixtureKeywords.html">Flow Fixture Keywords</a>.</li><li>A custom flow fixture keyword defined in the current fixture.</li><li>A method defined in the current fixture.</li><li>A method defined in the current fixture's <a href="../Fit/SystemUnderTest.html">System Under Test</a>.</li><li>The name of a new fixture that will process the rest of the current table.</li></ul><br>
+Each row is interpreted as one of the following.<ul><li>One of the standard <a href="../Fit/FlowFixtureKeywords.html">Flow Fixture Keywords</a>.</li><li>A custom flow fixture keyword defined in the current fixture.</li><li><a href="../Fit/MethodExecution.html">Method Execution</a> for a method defined in the current fixture or the current fixture's <a href="../Fit/SystemUnderTest.html">System Under Test</a>.</li><li>The name of a new fixture that will process the rest of the current table.</li></ul><br>
If the method invoked for a row returns certain types, the return value will be interpreted by a new fixture that will process the rest of the table.<br>
<br>
Any enumerable return type is processed by an <a href="../Fit/ArrayFixture.html">Array Fixture</a>.<br>
@@ -14,7 +14,9 @@
<body>
<div class="topbar"><a href="../FitSharp.html" class="siteid"><i>fit</i>Sharp</a></div>
<div class="pagename">Import Fixture</div>
-<div class="content"><a href="../Fit/ImportFixture.html">Import Fixture</a> adds to the list of namespaces that are searched for fixture classes.<br>
+<div class="content"><i>Obsolete: </i>Use <a href="../FitSharp/SuiteConfigurationFile.html">Suite Configuration File</a><br>
+<br>
+<a href="../Fit/ImportFixture.html">Import Fixture</a> adds to the list of namespaces that are searched for fixture classes.<br>
<br>
<table border="1" cellpadding="2" cellspacing="0">
<tr><td>story test fixture</td></tr>
@@ -0,0 +1,97 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- fitSharp
+Copyright © Syterra Software Inc. All rights reserved.
+The use and distribution terms for this software are covered by the Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
+which can be found in the file license.txt at the root of this distribution. By using this software in any fashion, you are agreeing
+to be bound by the terms of this license. You must not remove this notice, or any other, from this software. -->
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+ <link href="../fitsharp1.css" type="text/css" rel="stylesheet">
+ <link href="fit.css" type="text/css" rel="stylesheet">
+ <title>Method Execution</title>
+</head>
+<body>
+<div class="topbar"><a href="../FitSharp.html" class="siteid"><i>fit</i>Sharp</a></div>
+<div class="pagename">Method Execution</div>
+<div class="content">We can execute methods on our <a href="../Fit/SystemUnderTest.html">System Under Test</a> using a row in <a href="../Fit/FlowMode.html">Flow Mode</a>.<br>
+<br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>when test is</td><td><br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>sample class</td></tr>
+<tr><td>check</td><td>count</td><td>0</td></tr>
+<tr><td>count method</td></tr>
+<tr><td>check</td><td>count</td><td>1</td></tr>
+</table>
+</td><td>then result is</td><td><br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>sample class</td></tr>
+<tr><td>check</td><td>count</td><td class="pass">0</td></tr>
+<tr><td>count method</td></tr>
+<tr><td>check</td><td>count</td><td class="pass">1</td></tr>
+</table></td></tr>
+</table>
+<br>
+We can check return values and pass parameters.<br>
+<br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>when test is</td><td><br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>sample class</td></tr>
+<tr><td>check</td><td>method no parms</td><td>samplereturn</td></tr>
+<tr><td>check</td><td>method with parms</td><td>my value</td><td>samplemy value</td></tr>
+</table>
+</td><td>then result is</td><td><br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>sample class</td></tr>
+<tr><td>check</td><td>method no parms</td><td class="pass">samplereturn</td></tr>
+<tr><td>check</td><td>method with parms</td><td>my value</td><td class="pass">samplemy value</td></tr>
+</table></td></tr>
+</table>
+<br>
+We can execute generic methods.<br>
+<br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>when test is</td><td><br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>sample class</td></tr>
+<tr><td>check</td><td>generic method of System.Int32</td><td>123</td><td>sample123</td></tr>
+</table>
+</td><td>then result is</td><td><br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>sample class</td></tr>
+<tr><td>check</td><td>generic method of System.Int32</td><td>123</td><td class="pass">sample123</td></tr>
+</table></td></tr>
+</table>
+<br>
+We can access properties, fields and indexers.<br>
+<br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>when test is</td><td><br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>sample class</td></tr>
+<tr><td>set</td><td>property</td><td>something</td></tr>
+<tr><td>check</td><td>property</td><td>something</td></tr>
+<tr><td>set</td><td>field</td><td>else</td></tr>
+<tr><td>check</td><td>field</td><td>else</td></tr>
+<tr><td>check</td><td>anything</td><td>indexanything</td></tr>
+</table>
+</td><td>then result is</td><td><br>
+<table border="1" cellpadding="2" cellspacing="0">
+<tr><td>sample class</td></tr>
+<tr><td>set</td><td>property</td><td>something</td></tr>
+<tr><td>check</td><td>property</td><td class="pass">something</td></tr>
+<tr><td>set</td><td>field</td><td>else</td></tr>
+<tr><td>check</td><td>field</td><td class="pass">else</td></tr>
+<tr><td>check</td><td>anything</td><td class="pass">indexanything</td></tr>
+</table></td></tr>
+</table>
+<br>
+</div>
+<div style="width:100%;text-align:right">
+<span class="footer">&copy; Copyright <a href="http://www.syterra.com">Syterra Software Inc.</a> All rights reserved.</span>
+</div>
+
+</body>
+</html>
@@ -14,7 +14,7 @@
<body>
<div class="topbar"><a href="../FitSharp.html" class="siteid"><i>fit</i>Sharp</a></div>
<div class="pagename">Test Runner</div>
-<div class="content">TestRunner was a command line program that let us execute FitNesse tests and suites in a batch mode. The TestRunner protocol has been deprecated by FitNesse. To run FitNesse tests from the command line, we now use the FitNesse <a class="externallink" href="http://fitnesse.org/FitNesse.UserGuide.CommandLineRestCommands">Command Line REST Commands</a>.<br>
+<div class="content"><i>Obsolete: </i>TestRunner was a command line program that let us execute FitNesse tests and suites in a batch mode. The TestRunner protocol has been deprecated by FitNesse. To run FitNesse tests from the command line, we now use the FitNesse <a class="externallink" href="http://fitnesse.org/FitNesse.UserGuide.CommandLineRestCommands">Command Line REST Commands</a>.<br>
<br>
The following applies only to old versions of FitNesse and <span style="font-family:verdana,sans-serif"><i>fit</i>Sharp</span>.<br>
<br>
@@ -1,42 +0,0 @@
-<html>
-<head>
-<link href="fit.css" type="text/css" rel="stylesheet">
-</head>
-<body>
-<h2>Single-parameter actions have side-effects and can be checked:</h2><table border="1" cellspacing="0">
-<tr><td colspan="2">Specify</td>
-</tr>
-<tr><td><table border>
-<tr><td>DoFixtureFlowUnderTest</td></tr>
-</table>
-<table border>
-<tr><td>add</td><td>1</td></tr>
-</table>
-<table border>
-<tr><td>add</td><td>2</td></tr>
-</table>
-<table border>
-<tr><td>check</td><td>sum</td><td>3</td></tr>
-</table>
-<table border>
-<tr><td>check</td><td>sum</td><td>4</td></tr>
-</table></td>
-<td><table border>
-<tr><td>DoFixtureFlowUnderTest</td></tr>
-</table>
-<table border>
-<tr><td>add</td><td>1</td></tr>
-</table>
-<table border>
-<tr><td>add</td><td>2</td></tr>
-</table>
-<table border>
-<tr><td>check</td><td>sum</td><td class="pass">3</td></tr>
-</table>
-<table border>
-<tr><td>check</td><td>sum</td><td class="fail">4 <span class="fit_label">expected</span><hr />3 <span class="fit_label">actual</span></td></tr>
-</table></td>
-</tr>
-</table>
-<hr><br>[<a href="../../FrontPage.html">Front Page</a>] [<a href="../../RecentChanges.html">Recent Changes</a>]
-</body></html>
@@ -3,11 +3,13 @@
// which can be found in the file license.txt at the root of this distribution. By using this software in any fashion, you are agreeing
// to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
+using System;
using fitSharp.Fit.Model;
using fitSharp.Machine.Engine;
using fitSharp.Machine.Model;
namespace fitSharp.Fit.Fixtures {
+ [Obsolete("use configure symbols clear")]
public class ClearSymbols: Interpreter {
public void Interpret(CellProcessor processor, Tree<Cell> table) {
processor.TestStatus.TableCount--;
@@ -4,14 +4,20 @@
// to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
using System;
+using System.Linq;
+using fitSharp.Machine.Model;
namespace fitSharp.Test.Double {
public class SampleClass {
public static SampleClass Parse(string input) {
return new SampleClass();
}
- public void VoidMethod() {}
+ public void CountMethod() {
+ Count++;
+ }
+
+ public int Count;
public string MethodNoParms() {
return "samplereturn";
@@ -29,6 +35,14 @@ public class SampleClass {
return "sample" + input;
}
+ public string MethodWithParamArray(params string[] strings) {
+ return strings.Aggregate((current, next) => current + ", " + next);
+ }
+
+ public string MethodWithOptionalParms(string first = "hello", string second = "world") {
+ return first + " " + second;
+ }
+
public string Property { get; set; }
public string Field;
@@ -45,4 +59,12 @@ public class SampleClass {
public string Duplicate;
private string _duplicate { get { return Duplicate.ToUpper();} }
}
+
+ public class SampleClassAdapter: DomainAdapter {
+ public SampleClassAdapter() { systemUnderTest = new SampleClass(); }
+ public object SystemUnderTest { get { return systemUnderTest; } }
+ public string MethodwithOptionalParms() { return systemUnderTest.MethodWithOptionalParms(); }
+ public string MethodwithOptionalParms(string first) { return systemUnderTest.MethodWithOptionalParms(first); }
+ readonly SampleClass systemUnderTest;
+ }
}
@@ -19,11 +19,12 @@ namespace fitSharp.Test.NUnit.Machine {
}
[Test] public void VoidMethodIsInvoked() {
- RuntimeMember method = GetMethod("voidmethod", 0);
+ RuntimeMember method = GetMethod("countmethod", 0);
Assert.IsNotNull(method);
TypedValue result = method.Invoke(new object[] {});
Assert.AreEqual(null, result.Value);
Assert.AreEqual(typeof(void), result.Type);
+ Assert.AreEqual(1, instance.Count);
}
RuntimeMember GetMethod(string memberName, int count) {

0 comments on commit d1ad2f1

Please sign in to comment.