Skip to content

Commit

Permalink
prepare release 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jediwhale committed Mar 29, 2014
1 parent d701565 commit 5d20325
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 13 deletions.
3 changes: 2 additions & 1 deletion document/fitSharp/Fit/ConfigureFixture.html
Expand Up @@ -24,7 +24,8 @@
<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>start</li><li>stop</li><li>show</li></ul><span style="font-size:larger; font-family:Arial,sans-serif; font-weight:bold; font-style:italic; color:navy;">Processor</span><br>
<br>
The commands are:<ul><li>addOperator <span style="font-style:italic">&lt;operatorClassName&gt;</span></li><li>removeOperator <span style="font-style:italic">&lt;operatorClassName&gt;</span></li></ul><span style="font-size:larger; font-family:Arial,sans-serif; font-weight:bold; font-style:italic; color:navy;">Symbols</span><br>
The commands are:<ul><li>addOperator <span style="font-style:italic">&lt;operatorClassName&gt;</span></li><li>removeOperator <span style="font-style:italic">&lt;operatorClassName&gt;</span></li></ul><br>
<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, display and clear <a href="../Fit/SymbolValues.html">Symbol Values</a>.<br>
<br>
Expand Down
2 changes: 1 addition & 1 deletion document/fitSharp/Fit/FlowFixtureKeywords.html
Expand Up @@ -14,7 +14,7 @@
<body>
<div class="topbar"><a href="../FitSharp.html" class="siteid"><i>fit</i>Sharp</a></div>
<div class="pagename">Flow Fixture Keywords</div>
<div class="content"><ul><li><a href="../Fit/AbandonStoryTestKeyword.html">abandon story test</a> - stop execution of the current story test</li><li><a href="../Fit/CalculateKeyword.html">calculate</a> - use <a href="../Fit/CalculateFixture.html">Calculate Fixture</a> with current SUT</li><li>check <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> <span style="font-style:italic">&lt;expected value&gt;</span></li><li>check fields for <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> wraps the result so it can be checked with <a href="../Fit/ArrayFixture.html">Array Fixture</a>.</li><li><a href="../Fit/CommentKeyword.html">comment</a> - skip rest</li><li>ensure <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> - expected true</li><li><a href="../Fit/IgnoredKeyword.html">ignored</a> - ignore rest</li><li><a href="../Fit/NameKeyword.html">name</a> <span style="font-style:italic">&lt;name&gt;</span> <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> - wrap result and save</li><li><a href="../Fit/NotKeyword.html">not</a> <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> - expected false</li><li><a href="../Fit/NoteKeyword.html">note</a> - skip row</li><li>set <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> - execute a method, by convention a setter method</li><li><a href="../Fit/RejectKeyword.html">reject</a> <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> - expected false</li><li><a href="../Fit/ShowKeyword.html">show</a> <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span></li><li><a href="../Fit/ShowAsKeyword.html">show as</a> <span style="font-style:italic">&lt;attributes&gt;</span> <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span></li><li><a href="../Fit/StartKeyword.html">start</a> <span style="font-style:italic">&lt;class&gt;</span> </li><li><a href="../Fit/WithKeyword.html">with</a></li></ul></div>
<div class="content"><ul><li><a href="../Fit/AbandonStoryTestKeyword.html">abandon story test</a> - stop execution of the current story test</li><li><a href="../Fit/CalculateKeyword.html">calculate</a> - use <a href="../Fit/CalculateFixture.html">Calculate Fixture</a> with current SUT</li><li>check <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> <span style="font-style:italic">&lt;expected value&gt;</span></li><li>check fields for <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> wraps the result so it can be checked with <a href="../Fit/ArrayFixture.html">Array Fixture</a>.</li><li><a href="../Fit/CommentKeyword.html">comment</a> - skip rest</li><li>ensure <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> - expected true</li><li><a href="../Fit/IgnoredKeyword.html">ignored</a> - ignore rest</li><li><a href="../Fit/NameKeyword.html">name</a> <span style="font-style:italic">&lt;name&gt;</span> <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> - wrap result and save</li><li><a href="../Fit/NotKeyword.html">not</a> <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> - expected false</li><li><a href="../Fit/NoteKeyword.html">note</a> - skip row</li><li>set <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> - execute a method, by convention a setter method</li><li><a href="../Fit/RejectKeyword.html">reject</a> <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> - expected false</li><li><a href="../Fit/ShowKeyword.html">show</a> <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span></li><li><a href="../Fit/ShowAsKeyword.html">show as</a> <span style="font-style:italic">&lt;attributes&gt;</span> <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span></li><li><a href="../Fit/StartKeyword.html">start</a> <span style="font-style:italic">&lt;class&gt;</span> </li><li><a href="../Fit/WaitUntilKeyword.html">wait until</a> <span style="font-style:italic">&lt;method&gt;</span> <span style="font-style:italic">&lt;parms&gt;</span> <span style="font-style:italic">&lt;expected value&gt;</span></li><li><a href="../Fit/WithKeyword.html">with</a></li></ul></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>
Expand Down
41 changes: 41 additions & 0 deletions document/fitSharp/Fit/WaitUntilKeyword.html
@@ -0,0 +1,41 @@
<!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>Wait Until Keyword</title>
</head>
<body>
<div class="topbar"><a href="../FitSharp.html" class="siteid"><i>fit</i>Sharp</a></div>
<div class="pagename">Wait Until Keyword</div>
<div class="content">The Wait Until keyword is one of the <a href="../Fit/FlowFixtureKeywords.html">Flow Fixture Keywords</a>. It executes a method repeatedly until it returns an expected result.<br>
<br>
<table border="1" cellpadding="2" cellspacing="0">
<tr><td>when input is</td><td>'sample class'<br>
'wait until' 'count by' 2 10</td><td>then output is</td><td><table><tr><td><span class="fit_SUT">sample class</span></td> </tr></table><table><tr><td><span class="fit_keyword">wait until</span></td> <td><span class="fit_member">count by</span></td> <td>2</td> <td class="pass">10</td> </tr></table></td></tr>
</table>
<br>
By default, it tries 100 times in 1000 milliseconds (every 10 milliseconds) before failing. We can change these defaults by defining different <a href="../Fit/SymbolValues.html">Symbol Values</a> for the symbols WaitFor.Time (in total time in milliseconds) and WaitFor.Count.<br>
<br>
<table border="1" cellpadding="2" cellspacing="0">
<tr><td>when input is</td><td>configure symbols<br>
save WaitFor.Time 'value of System.Int32' 20<br>
save WaitFor.Count 'value of System.Int32' 10<br>
<br>
'sample class'<br>
'wait until' 'count by' 2 22</td><td>then output is</td><td><table><tr><td><span class="fit_interpreter">configure</span></td> <td><span class="fit_SUT">symbols</span></td> </tr></table><table><tr><td><span class="fit_member">save</span></td> <td>WaitFor.Time</td> <td><span class="fit_member">value of System.Int32</span></td> <td>20</td> </tr></table><table><tr><td><span class="fit_member">save</span></td> <td>WaitFor.Count</td> <td><span class="fit_member">value of System.Int32</span></td> <td>10</td> </tr></table></div><br /><div><table><tr><td><span class="fit_SUT">sample class</span></td> </tr></table><table><tr><td><span class="fit_keyword">wait until</span></td> <td><span class="fit_member">count by</span></td> <td>2</td> <td class="fail">22 <span class="fit_label">expected</span><hr />20 <span class="fit_label">actual</span></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>
23 changes: 23 additions & 0 deletions document/fitSharp/FitSharp/Release23.html
@@ -0,0 +1,23 @@
<!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>Release23</title>
</head>
<body>
<div class="topbar"><a href="../FitSharp.html" class="siteid"><i>fit</i>Sharp</a></div>
<div class="pagename">Release23</div>
<div class="content"><span style="font-size:larger; font-family:Arial,sans-serif; font-weight:bold; font-style:italic; color:navy;">Features</span><ul><li><a href="../DbFit.html">Db Fit</a> formats column names as 'name', which allows column names that are SQL Server reserved words.</li><li><a href="../Fit/WritingTests.html">Writing Tests</a> in HTML table format can include <a href="../Fit/HtmlComments.html">Html Comments</a>.</li><li>The <code>AddFirst</code> method adds <a href="../Fit/CellOperators.html">Cell Operators</a> with highest priority.</li><li>The <code>AbandonTestSuiteException</code> will <a href="../Fit/AbandonSuite.html">Abandon Suite</a> execution.</li><li><a href="../DbFit.html">Db Fit</a> handles the Oracle <code>raw</code> type</li><li>The <a href="../Fit/WaitUntilKeyword.html">Wait Until Keyword</a> checks until a method returns an expected result.</li></ul><span style="font-size:larger; font-family:Arial,sans-serif; font-weight:bold; font-style:italic; color:navy;">Bugs Fixed</span><ul><li>parse operators work on trimmed content</li><li>slim parse and compose with current culture</li><li>parsearray create empty array with blank content</li><li>symbols converted to requested type</li><li>output contains fit stylesheet link</li><li>compose slim dictionary as fitnesse hash table</li><li>allow assignable types for slim symbols</li></ul></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>
2 changes: 1 addition & 1 deletion document/fitSharp/FitSharp/ReleaseInformation.html
Expand Up @@ -14,7 +14,7 @@
<body>
<div class="topbar"><a href="../FitSharp.html" class="siteid"><i>fit</i>Sharp</a></div>
<div class="pagename">Release Information</div>
<div class="content">These are the new features and bug fixes implemented in each release.<ul><li><a href="../FitSharp/Release22.html">Release 2.2</a></li><li><a href="../FitSharp/Release21.html">Release 2.1</a></li><li><a href="../FitSharp/Release20.html">Release 2.0</a></li><li><a href="../FitSharp/Release19.html">Release 1.9</a></li><li><a href="../FitSharp/Release18.html">Release 1.8</a></li><li><a href="../FitSharp/Release17.html">Release 1.7</a></li><li><a href="../FitSharp/Release16.html">Release 1.6</a></li><li><a href="../FitSharp/Release151.html">Release 1.5.1</a></li><li><a href="../FitSharp/Release15.html">Release 1.5</a></li><li><a href="../FitSharp/Release141.html">Release 1.4.1</a></li><li><a href="../FitSharp/Release14.html">Release 1.4</a></li><li><a href="../FitSharp/Release13.html">Release 1.3</a></li><li><a href="../FitSharp/Release12.html">Release 1.2</a></li><li><a href="../FitSharp/Release11.html">Release 1.1</a></li><li><a href="../FitSharp/Release10.html">Release 1.0</a></li></ul></div>
<div class="content">These are the new features and bug fixes implemented in each release.<ul><li><a href="../FitSharp/Release23.html">Release 2.3</a></li><li><a href="../FitSharp/Release22.html">Release 2.2</a></li><li><a href="../FitSharp/Release21.html">Release 2.1</a></li><li><a href="../FitSharp/Release20.html">Release 2.0</a></li><li><a href="../FitSharp/Release19.html">Release 1.9</a></li><li><a href="../FitSharp/Release18.html">Release 1.8</a></li><li><a href="../FitSharp/Release17.html">Release 1.7</a></li><li><a href="../FitSharp/Release16.html">Release 1.6</a></li><li><a href="../FitSharp/Release151.html">Release 1.5.1</a></li><li><a href="../FitSharp/Release15.html">Release 1.5</a></li><li><a href="../FitSharp/Release141.html">Release 1.4.1</a></li><li><a href="../FitSharp/Release14.html">Release 1.4</a></li><li><a href="../FitSharp/Release13.html">Release 1.3</a></li><li><a href="../FitSharp/Release12.html">Release 1.2</a></li><li><a href="../FitSharp/Release11.html">Release 1.1</a></li><li><a href="../FitSharp/Release10.html">Release 1.0</a></li></ul></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>
Expand Down
10 changes: 5 additions & 5 deletions source/fitSharp/Fit/Operators/CheckVolatile.cs
Expand Up @@ -5,7 +5,6 @@

using System.Threading;
using fitSharp.Fit.Engine;
using fitSharp.Machine.Application;
using fitSharp.Machine.Engine;
using fitSharp.Machine.Exception;
using fitSharp.Machine.Model;
Expand All @@ -26,11 +25,11 @@ public class CheckVolatile : CellOperator, CheckOperator {
}

void CheckEventuallyMatches(CellOperationValue actualValue, Tree<Cell> expectedCell) {
var wait = Processor.Memory.GetItem<Settings>().WaitTime;
if (wait == 0) wait = defaultWaitTime;
var wait = Processor.Get<Symbols>().GetValueOrDefault<int>("WaitFor.Time", defaultWaitTime);
var maxCount = Processor.Get<Symbols>().GetValueOrDefault<int>("WaitFor.Count", defaultWaitCount);
var sleep = 0;
TypedValue actual = TypedValue.Void;
for (var count = 0; count < 100; count++) {
for (var count = 0; count < maxCount; count++) {
Processor.Get<Logging>().BeginCell(expectedCell.Value);
try {
actual = actualValue.GetTypedActual(Processor);
Expand All @@ -42,7 +41,7 @@ public class CheckVolatile : CellOperator, CheckOperator {
Processor.TestStatus.MarkRight(expectedCell.Value);
return;
}
var sleepThisTime = (wait*count)/100 - sleep;
var sleepThisTime = (wait*count)/maxCount - sleep;
if (sleepThisTime <= 0) continue;
Thread.Sleep(sleepThisTime);
sleep += sleepThisTime;
Expand All @@ -52,5 +51,6 @@ public class CheckVolatile : CellOperator, CheckOperator {
}

const int defaultWaitTime = 1000;
const int defaultWaitCount = 100;
}
}
2 changes: 0 additions & 2 deletions source/fitSharp/Machine/Application/Settings.cs
Expand Up @@ -24,7 +24,6 @@ public class Settings: Copyable {
public string Behavior { get; set; }
public bool DryRun { get; set; }
public string TagList { get; set; }
public int WaitTime { get; set; }

public int CodePageNumber {
get {
Expand Down Expand Up @@ -54,7 +53,6 @@ public class Settings: Copyable {
XmlOutput = other.XmlOutput;
DryRun = other.DryRun;
TagList = other.TagList;
WaitTime = other.WaitTime;
}

public Copyable Copy() {
Expand Down
5 changes: 5 additions & 0 deletions source/fitSharp/Machine/Model/StringObjectMemory.cs
Expand Up @@ -12,6 +12,11 @@ public class StringObjectMemory {
public void SaveValue<T>(string id, T value) { Save(id, value); }
public void Clear() { items.Clear(); }
public bool HasValue(string id) { return items.ContainsKey(id.Trim()); }
public T GetValueAs<T>(string id) { return (T) GetValue(id); }

public T GetValueOrDefault<T>(string id, T defaultValue) {
return HasValue(id) ? (T)items[id.Trim()] : defaultValue;
}

public object GetValue(string id) {
if (HasValue(id)) return items[id.Trim()];
Expand Down
7 changes: 6 additions & 1 deletion source/fitSharpTest/Double/SampleClass.cs
@@ -1,4 +1,4 @@
// Copyright © 2011 Syterra Software Inc. All rights reserved.
// Copyright © 2014 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.
Expand All @@ -18,6 +18,11 @@ public class SampleClass {
Count++;
}

public int CountBy(int increment) {
Count += increment;
return Count;
}

public int Count;

public string MethodNoParms() {
Expand Down
6 changes: 5 additions & 1 deletion source/fitTest/Double/SampleDoFixture.cs
Expand Up @@ -71,5 +71,9 @@ public class SampleDoFixture: DoFixture {
public void TearDown() {
Log.Write("TearDown()");
}

public string ReplaceWithIn(string oldValue, string newValue, string text) {
return text.Replace(oldValue, newValue);
}
}
}
}
3 changes: 2 additions & 1 deletion source/fitTest/NUnit/FlowKeywordsTest.cs
Expand Up @@ -54,7 +54,8 @@ namespace fit.Test.NUnit {
}

[Test] public void WaitUntilRepeatsUpToLimit() {
fixture.Processor.Memory.GetItem<Settings>().WaitTime = 10;
fixture.Processor.Get<Symbols>().Save("WaitFor.Count", 10);
fixture.Processor.Get<Symbols>().Save("WaitFor.Time", 1);
var table = Parse.ParseFrom("<table><tr><td>wait until</td><td>next count</td><td>101</td></tr></table>");
keywords.WaitUntil(table.Parts.Parts);
Assert.AreEqual(fitSharp.Fit.Model.TestStatus.Wrong, table.Parts.Parts.Last.GetAttribute(CellAttribute.Status));
Expand Down

0 comments on commit 5d20325

Please sign in to comment.