Brad Robinson 7 years ago
parent
commit
0a48bb03ea

BIN
Doc/ConsoleReport.png


BIN
Doc/HtmlReport.png


+ 13 - 0
Doc/download.md

@@ -0,0 +1,13 @@
+# PetaTest - Download
+
+Download from NuGet:
+
+    PM> Install-Package PetaTest
+    
+View on NuGet:
+
+* <http://nuget.org/List/Packages/PetaTest>
+
+Get the source from GitHub:
+
+* <https://github.com/toptensoftware/petatest>

+ 35 - 0
Doc/getting_started.md

@@ -0,0 +1,35 @@
+# PetaTest - Getting Started
+
+1. In Visual Studio, create a new console project.  (PetaTest projects are executables - not assemblies)
+
+2. Install PetaTest using [Nuget](http://nuget.org/List/Packages/PetaTest).  You'll need to agree to 
+	[the license](license) after which Nuget will add PetaTest.cs to your project.
+
+        PM> Install-Package PetaTest
+
+3. In `program.cs` add a `using` clause for `PetaTest`
+
+		using PetaTest;
+
+4. In `Main()` call PetaTest's Runner:
+
+		static int Main(string[] args)
+		{
+			PetaTest.Runner.RunMain(args);
+			return 0;
+		}
+
+5. Create a test fixture and test case:
+
+		[TestFixture]
+		public class MyTests
+		{
+			[Test]
+			public void Test1()
+			{
+				Assert.AreNotEqual("PetaTest", "NUnit");
+			}
+		}
+
+6. Run the project and PetaTest will execute all your tests.
+

+ 18 - 0
Doc/license.md

@@ -0,0 +1,18 @@
+# PetaTest - License
+
+PetaTest
+Copyright 2011 Topten Software
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this product except in compliance with the License.
+You may obtain a copy of the License at
+
+<http://www.apache.org/licenses/LICENSE-2.0>
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+ 

BIN
Doc/nuget_icon.png


+ 52 - 0
Doc/running_tests.md

@@ -0,0 +1,52 @@
+# PetaTest - Running PetaTest Projects
+
+With PetaTest there is no external "runner" program - it's all built in to your unit test project.  To run your tests, simply run your project's output `.exe` file.
+
+By default PetaTest will generate reports to the console - so you can view the progress of the tests as they run.  On completion, you'll be prompted to view a full report in your browser. Press 'Y' to show the report.
+
+You can control this behaviour with the command line options shown below.
+
+### Command Line Options
+
+* `/showreport[:yes|no]` - automatically show the HTML report instead of prompting (default = prompt)
+* `/htmlreport[:yes|no]` - generate the HTML report (default = yes)
+* `/dirtyexit[:yes|no]` - terminate the process on completion rather than cleanly shutting down (faster in some cases)
+* `/runall[:yes|no]` - run all tests even if one or more are marked as active
+* `/verbose` - show Console.WriteLine output in the console while the test runs
+* `/out:<filename>` - name of the HTML file to generate - defaults to `report.html` in the current directory.
+
+### Active Tests
+
+Often during debugging and development you'll want to run just a single test.  You can mark such a test with the `Active` property. For example:
+
+	[Test(Active=true)]
+	public void Test1()
+	{
+		// This will run
+	}
+
+	[Test]
+	public void Test2()
+	{
+		// This won't
+	}
+
+It also works for paremeterized inputs:
+
+	[Test("Hello", Active=true)]
+	[Test("World")]
+	public void Test(string input)
+	{
+		// This will only run once with "Hello" input
+	}
+
+and it works on test fixtures too.
+
+	[TestFixture(Active=true)]
+	public class MyTests
+	{
+		...
+	}
+
+You can apply the `Active` flag to multiple tests and test fixtures and all those marked will be run.  If nothing is marked as active then all tests are run.
+

+ 702 - 0
Doc/sample_exception.html

@@ -0,0 +1,702 @@
+<html>
+<head>
+<style>
+body { font-family:Arial; margin:20px; font-size:10pt}
+div.assembly>div.title { font-size:20pt; margin-bottom:20px; border-bottom:1px solid silver; padding-bottom:20px; }
+div.testfixture>div.title { font-size:16pt; }
+div.testfixture { margin-bottom:20px; }
+div.test { margin-left:20px; }
+div.test div.title { font-size:12pt; }
+div.errormessage { color:Red; padding-top:10px; }
+div.pass>div.title { color:#808080; }
+span.highlighted { color:Red; }
+pre.code { background-color:#f0f0f0; }
+div.summary { border:1px solid silver; padding:10px; margin-bottom:20px; text-align:center; }
+div.fail div.summary { background-color:Red; color:White; }
+div.pass div.summary { background-color:Lime; }
+div.collapsed div.content { display:none; }
+div.test div.content { border-left:2px solid #d0d0d0; padding-left:10px; margin-left:10px; }
+a { text-decoration:none; color:#606060; }
+a:hover { color:orange; }
+div>div.title>span.indicator { display:inline-block; width:10px; height:10px; background-color:lime; border-radius:7px}
+div.fail>div.title>span.indicator { display:inline-block; width:10px; height:10px; background-color:red; }
+div.assembly>div.title>span.indicator { display:none; }
+div.misc_info { color:#808080; }
+</style>
+<script>
+window.addEventListener("load", setup, false);
+function setup() {
+    var divs = document.getElementsByClassName("toggle");
+    for (var i = 0; i < divs.length; i++) {
+        divs[i].onclick = function () {
+            var top = this.parentNode.parentNode;
+            if (top.className.indexOf(" collapsed") < 0)
+                top.className += " collapsed";
+            else
+                top.className = top.className.replace(" collapsed", "");
+            return false;
+        }
+    }
+}
+</script>
+</head>
+<body>
+<div class="assembly fail">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+Test Results for PetaTest.exe
+</a>
+
+</div>
+<div class="summary">
+Passed: 34 Failed: 1 Warnings: 0 Time in Test Cases: 72ms
+</div>
+<div class="content">
+<div class="testfixture fail">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+Test Fixture PetaTest.AssertionTests()
+</a>
+
+</div>
+<div class="content">
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_sbyte()
+</a>
+ <small>4ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test fail">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_byte()
+</a>
+
+</div>
+<div class="content">
+<div class="exception">
+<div class="errormessage">
+Assertion failed - Strings are not equal at offset 6
+</div>
+<p>
+Detail
+</p>
+<pre>  lhs: &quot;Hello World&quot;
+  rhs: &quot;Hello There&quot;
+              ^</pre>
+<p>
+Stack Trace
+</p>
+<pre class="stacktrace">AreEqual_byte - c:\b\dev\source\PetaTest\PetaTest\TestsAssertions.cs(23)
+</pre>
+<p>
+Location
+</p>
+<pre class="code">  00021:  		public void AreEqual_byte()
+  00022:  		{
+<span class="highlighted">  00023:-&gt;			Assert.AreEqual(&quot;Hello World&quot;, &quot;Hello There&quot;);
+</span>  00024:  			Assert.AreEqual&lt;byte&gt;(10, 10);
+  00025:  			Assert.AreNotEqual&lt;byte&gt;(10, 11);
+</pre>
+
+</div>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_short()
+</a>
+ <small>2ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_ushort()
+</a>
+ <small>2ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_int()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_uint()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_long()
+</a>
+ <small>2ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_ulong()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_float()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_double()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_double_within()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_decimal()
+</a>
+ <small>2ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_string()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_dates()
+</a>
+ <small>16ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsTrue()
+</a>
+ <small>0ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsNull()
+</a>
+ <small>0ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreSame()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsEmpty_String()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsNullOrEmpty_String()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsEmpty_Collection()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+Contains_Collection()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+Contains_String()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+Greater()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+GreaterOrEqual()
+</a>
+ <small>0ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+Less()
+</a>
+ <small>0ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+LessOrEqual()
+</a>
+ <small>0ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsInstanceOf()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsAssignableFrom()
+</a>
+ <small>2ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsAssignableTo()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AllItemsAreUnique()
+</a>
+ <small>4ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AllItemsAreNotNull()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AllItemsAreEqual()
+</a>
+ <small>2ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AllItemsAreInstancesOf()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsSubsetOf()
+</a>
+ <small>7ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEquivalent()
+</a>
+ <small>4ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+
+</div>
+
+</div>
+
+</div>
+
+</div>
+<div class="misc_info">
+Time in test cases 72ms, setup/teardown 0ms, test framework 102ms<br/>Tests run at 31-Jul-11 10:09:13 PM by bradr on MACBOOK under Microsoft Windows NT 6.1.7600.0<br/>Command line: c:\b\dev\source\PetaTest\PetaTest\bin\Release\PetaTest.exe /out:..\..\unittest.html
+</div>
+
+</body>
+
+</html>

+ 11 - 0
Doc/screenshots.md

@@ -0,0 +1,11 @@
+# PetaTest - Screen Shots
+
+A sample HTML report showing a failed assertion:
+
+![PetaTest_HtmlReport.png](<HtmlReport.png>)
+
+And the same error in the console output:
+
+![PetaTest_ConsoleReport.png](<ConsoleReport.png>)
+
+

+ 11 - 0
Doc/support.md

@@ -0,0 +1,11 @@
+# PetaTest - Support
+
+PetaTest is provided as is, with no warranty or support.  If you find it useful then great, if not then so be it.  Unfortunately I'm unable to provide direct support, however:
+
+1. If you have a question about how it works or how to use it, you should be able to find the answer in the source code - it's all there and it really is quite simple.
+2. If you find a bug, please log it in github.  I'll review those from time to time and fix what I can.  Even better send a pull request with a fix.
+3. If you have a suggestion, log it in github - or implement it yourself and send a pull request.
+4. For anything else, you could try asking on [stackoverflow.com](http://stackoverflow.com) or [contact me](http://www.toptensoftware.com/contact) and I might get back to you.
+
+
+

+ 678 - 0
Doc/unittest.html

@@ -0,0 +1,678 @@
+<html>
+<head>
+<style>
+body { font-family:Arial; margin:20px; font-size:10pt}
+div.assembly>div.title { font-size:20pt; margin-bottom:20px; border-bottom:1px solid silver; padding-bottom:20px; }
+div.testfixture>div.title { font-size:16pt; }
+div.testfixture { margin-bottom:20px; }
+div.test { margin-left:20px; }
+div.test div.title { font-size:12pt; }
+div.errormessage { color:Red; padding-top:10px; }
+div.pass>div.title { color:#808080; }
+span.highlighted { color:Red; }
+pre.code { background-color:#f0f0f0; }
+div.summary { border:1px solid silver; padding:10px; margin-bottom:20px; text-align:center; }
+div.fail div.summary { background-color:Red; color:White; }
+div.pass div.summary { background-color:Lime; }
+div.collapsed div.content { display:none; }
+div.test div.content { border-left:2px solid #d0d0d0; padding-left:10px; margin-left:10px; }
+a { text-decoration:none; color:#606060; }
+a:hover { color:orange; }
+div>div.title>span.indicator { display:inline-block; width:10px; height:10px; background-color:lime; border-radius:7px}
+div.fail>div.title>span.indicator { display:inline-block; width:10px; height:10px; background-color:red; }
+div.assembly>div.title>span.indicator { display:none; }
+div.misc_info { color:#808080; }
+</style>
+<script>
+window.addEventListener("load", setup, false);
+function setup() {
+    var divs = document.getElementsByClassName("toggle");
+    for (var i = 0; i < divs.length; i++) {
+        divs[i].onclick = function () {
+            var top = this.parentNode.parentNode;
+            if (top.className.indexOf(" collapsed") < 0)
+                top.className += " collapsed";
+            else
+                top.className = top.className.replace(" collapsed", "");
+            return false;
+        }
+    }
+}
+</script>
+</head>
+<body>
+<div class="assembly pass">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+Test Results for PetaTest.exe
+</a>
+
+</div>
+<div class="summary">
+Passed: 35 Failed: 0 Warnings: 0 Time in Test Cases: 68ms
+</div>
+<div class="content">
+<div class="testfixture pass">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+Test Fixture PetaTest.AssertionTests()
+</a>
+
+</div>
+<div class="content">
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_sbyte()
+</a>
+ <small>6ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_byte()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_short()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_ushort()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_int()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_uint()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_long()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_ulong()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_float()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_double()
+</a>
+ <small>2ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_double_within()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_decimal()
+</a>
+ <small>2ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_string()
+</a>
+ <small>2ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEqual_dates()
+</a>
+ <small>16ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsTrue()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsNull()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreSame()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsEmpty_String()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsNullOrEmpty_String()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsEmpty_Collection()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+Contains_Collection()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+Contains_String()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+Greater()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+GreaterOrEqual()
+</a>
+ <small>0ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+Less()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+LessOrEqual()
+</a>
+ <small>0ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsInstanceOf()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsAssignableFrom()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsAssignableTo()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AllItemsAreUnique()
+</a>
+ <small>4ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AllItemsAreNotNull()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AllItemsAreEqual()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AllItemsAreInstancesOf()
+</a>
+ <small>1ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+IsSubsetOf()
+</a>
+ <small>7ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+<div class="test pass collapsed">
+<div class="title">
+<span class="indicator">
+
+</span>
+<a class="toggle" href="#">
+AreEquivalent()
+</a>
+ <small>4ms</small>
+</div>
+<div class="content">
+<pre>Test passed!
+</pre>
+
+</div>
+
+</div>
+
+</div>
+
+</div>
+
+</div>
+
+</div>
+<div class="misc_info">
+Time in test cases 68ms, setup/teardown 0ms, test framework 70ms<br/>Tests run at 31-Jul-11 10:09:51 PM by bradr on MACBOOK under Microsoft Windows NT 6.1.7600.0<br/>Command line: c:\b\dev\source\PetaTest\PetaTest\bin\Release\PetaTest.exe /out:..\..\unittest.html
+</div>
+
+</body>
+
+</html>

+ 81 - 0
Doc/writing_tests.md

@@ -0,0 +1,81 @@
+# PetaTest - Writing Tests
+
+### The Asserts
+
+PetaTest includes a fairly comprehensive set of asserts.  They're not described in detail here since they're very similar to other unit testing frameworks and the source code is right there at the top of `PetaTest.cs` if you need clarification on anything.
+
+### Parameterized Tests
+
+PetaTest can run test cases and test fixtures multiple times with different inputs.
+
+To run an entire test fixture multiple times, specify the parameters to be passed to the class' constructor with the `TestFixture` attribute:
+
+	[TestFixture("input1")]
+	[TestFixture("inputs")]
+	public class MyTests
+	{
+		public MyTests(string input)
+		{
+			// Store parameter
+		}
+	}
+
+Running individual test cases multiple times is similar:
+
+	[Test(1, 2, 3)]
+	[Test(10, 20, 30)]
+	public void TestAdd(int a, int b, int c)
+	{
+		Assert.AreEqual(a+b, c);
+	}
+
+You can also programatically supply input data by writing a method on the test fixture class and using the
+`Test` or `TestFixture` attribute's `Source` property to specify the name of that method.  
+
+For the `Test` attribute, the source data method can be a static or instance method, but for `TestFixture` it must be a static method.  In either case, the method must return an IEnumerable<object[]>.
+
+	[Test(Source = "GenerateFileList")]
+	public void TestParseFile(string filename)
+	{
+		// Run test on 'filename'
+	}
+
+	// This method will be called to get input data for TestParseFile test case.
+	public IEnumerable<object[]> GenerateFileList()
+	{
+		yield return new[] { "file1.txt" };
+		yield return new[] { "file2.txt" };
+
+		// or, perhap enumerate a directory
+	}
+
+### Setup and TearDown
+
+PetaTest supports Setup and TearDown methods at both the test and test fixture level by decorating methods with the following attributes:
+
+* `[SetUp]` - run before each test case
+* `[TearDown]` - run after each test case
+* `[TestFixtureSetUp]` - run before all the test cases in a test fixture 
+* `[TestFixtureTearDown]` - run after all the test cases in a test fixture
+
+eg:
+
+	[Setup]
+	void PrepareForTest()
+	{
+		// Do common initialization for all tests here
+	}
+
+### Generating Output
+
+Sometimes it useful to generate text from within a test case.  PetaTest supports this by capturing any output written to `Console`. Written text is captured and included in the generated report - alongside the test that generated it.
+
+eg:
+
+	[Test]
+	void SomeTestCase()
+	{
+		Console.WriteLine("This should appear in the test report");
+	}
+
+Note that by default PetaTest suppresses this output in the console window to keep the results clean.  To view this output as the tests run, use the `/verbose` command line option.

+ 11 - 1
README.markdown

@@ -19,5 +19,15 @@ PetaTest is tiny but powerful, embeddable, dependency free [Unit Testing](http:/
 * HTML Output - can generate a nice self-contained single file HTML report
 * Sort of compatible with NUnit's assertion model (but not constraints)
 
+## More Information
+
+* [Download](Doc/download.md)
+* [Screen Shots](Doc/screenshots.md)
+* [Sample Report (Pass)](Docs/unittest.html)
+* [Sample Report (Fail)](Docs/sample_exception.html)
+* [Getting Started](Docs/getting_started.md)
+* [Writing Tests](Docs/writing_tests.md)
+* [Running Tests](Docs/running_tests.md)
+* [Support](Docs/support.md)
+* [License](Docs/license.md)
 
-See here - <http://www.toptensoftware.com/petatest> - for full details.