(new CellBase(text)));
sheet.LoadStrings(XDocument.Parse(strings));
var sheetDocument = XDocument.Parse(worksheet);
- Assert.AreEqual(expected, sheet.Parse(sheetDocument).Format());
+ ClassicAssert.AreEqual(expected, sheet.Parse(sheetDocument).Format());
}
static string Worksheet(params string[] addresses) {
diff --git a/source/fitSharpTest/NUnit/Parser/HtmlTablesTest.cs b/source/fitSharpTest/NUnit/Parser/HtmlTablesTest.cs
index 9e7951de..c382690e 100644
--- a/source/fitSharpTest/NUnit/Parser/HtmlTablesTest.cs
+++ b/source/fitSharpTest/NUnit/Parser/HtmlTablesTest.cs
@@ -1,4 +1,4 @@
-// Copyright © 2018 Syterra Software Inc. All rights reserved.
+// Copyright � 2018 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.
@@ -8,28 +8,29 @@
using fitSharp.Machine.Model;
using fitSharp.Parser;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Parser {
[TestFixture] public class HtmlTablesTest {
[Test] public void ParseEmpty() {
var result = Parse(string.Empty);
- Assert.IsTrue(result.Branches.Count == 0);
+ ClassicAssert.IsTrue(result.Branches.Count == 0);
}
[Test] public void ParseNoTables() {
var result = Parse("set the table");
- Assert.IsTrue(result.Branches.Count == 0);
+ ClassicAssert.IsTrue(result.Branches.Count == 0);
result = Parse("set the (() => Parse("leadertrailer"));
+ ClassicAssert.Throws(() => Parse("leadertrailer"));
}
[Test] public void ParseTableWithBody() {
- Assert.Throws(() =>Parse("leadertrailer"));
+ ClassicAssert.Throws(() =>Parse("leadertrailer"));
}
[Test] public void ParseTwoTables() {
@@ -38,7 +39,7 @@ [Test] public void ParseTwoTables() {
}
[Test] public void ParseRow() {
- Assert.Throws(() =>Parse(" "));
+ ClassicAssert.Throws(() =>Parse(" "));
}
[Test] public void ParseCell() {
@@ -130,7 +131,7 @@ public void ParseCommentSeveralCommentBlocks() {
}
static void AssertParse(string input, string expected) {
- Assert.AreEqual("" + expected + " ", Parse(input).Format());
+ ClassicAssert.AreEqual("" + expected + " ", Parse(input).Format());
}
static Tree Parse(string input) {
diff --git a/source/fitSharpTest/NUnit/Parser/ScannerTest.cs b/source/fitSharpTest/NUnit/Parser/ScannerTest.cs
index 5f7db0ed..dd5be290 100644
--- a/source/fitSharpTest/NUnit/Parser/ScannerTest.cs
+++ b/source/fitSharpTest/NUnit/Parser/ScannerTest.cs
@@ -5,6 +5,7 @@
using fitSharp.Parser;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Parser {
[TestFixture]
@@ -15,7 +16,7 @@ public void FindsDelimitedText() {
Scan("basic [text] to be scanned");
AssertLeader("basic ");
AssertBody("text");
- Assert.AreEqual("[text]", scanner.Element.ToString());
+ ClassicAssert.AreEqual("[text]", scanner.Element.ToString());
}
[Test]
@@ -88,11 +89,11 @@ void AssertEmpty(string input) {
}
void AssertBody(string expected) {
- Assert.AreEqual(expected, scanner.Body.ToString());
+ ClassicAssert.AreEqual(expected, scanner.Body.ToString());
}
void AssertLeader(string expected) {
- Assert.AreEqual(expected, scanner.Leader.ToString());
+ ClassicAssert.AreEqual(expected, scanner.Leader.ToString());
}
void Scan(string input) {
diff --git a/source/fitSharpTest/NUnit/Parser/TextTableScannerTest.cs b/source/fitSharpTest/NUnit/Parser/TextTableScannerTest.cs
index 1dc24726..be0256af 100644
--- a/source/fitSharpTest/NUnit/Parser/TextTableScannerTest.cs
+++ b/source/fitSharpTest/NUnit/Parser/TextTableScannerTest.cs
@@ -6,6 +6,7 @@
using System.Text;
using fitSharp.Parser;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Parser {
[TestFixture] public class TextTableScannerTest {
@@ -21,7 +22,7 @@ static void AssertRawScan(string input, string expected) {
result.AppendFormat("{0}", token.Type);
if (token.Content.Length > 0) result.AppendFormat("={0}", token.Content);
}
- Assert.AreEqual(expected, result.ToString());
+ ClassicAssert.AreEqual(expected, result.ToString());
}
[Test] public void ScansPrefixAsLeader() {
diff --git a/source/fitSharpTest/NUnit/Parser/TextTablesTest.cs b/source/fitSharpTest/NUnit/Parser/TextTablesTest.cs
index 5433c946..e19bfdde 100644
--- a/source/fitSharpTest/NUnit/Parser/TextTablesTest.cs
+++ b/source/fitSharpTest/NUnit/Parser/TextTablesTest.cs
@@ -7,11 +7,12 @@
using fitSharp.Machine.Model;
using fitSharp.Parser;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Parser {
[TestFixture] public class TextTablesTest {
[Test] public void ParsesEmptyInputAsEmptyTree() {
- Assert.AreEqual(0, Parse(string.Empty).Branches.Count);
+ ClassicAssert.AreEqual(0, Parse(string.Empty).Branches.Count);
}
[Test] public void ParsesWordAsCell() {
@@ -88,13 +89,13 @@ [Test] public void IncludesLeaderInSecondTable() {
}
static void AssertParse(string input, string expected) {
- Assert.AreEqual(
+ ClassicAssert.AreEqual(
" test@" + expected,
Parse(input).Format());
}
static void AssertParseRaw(string input, string expected) {
- Assert.AreEqual(
+ ClassicAssert.AreEqual(
expected,
ParseRaw(input).Format());
}
diff --git a/source/fitSharpTest/NUnit/Slim/AnalyzerTest.cs b/source/fitSharpTest/NUnit/Slim/AnalyzerTest.cs
index 8e077c0f..44652470 100644
--- a/source/fitSharpTest/NUnit/Slim/AnalyzerTest.cs
+++ b/source/fitSharpTest/NUnit/Slim/AnalyzerTest.cs
@@ -7,6 +7,7 @@
using fitSharp.Slim.Analysis;
using fitSharp.Slim.Model;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Slim {
[TestFixture]
@@ -83,7 +84,7 @@ public void SetUp() {
}
void AssertCalls(string expected) {
- Assert.AreEqual(expected, string.Join(",", analyzer.Calls));
+ ClassicAssert.AreEqual(expected, string.Join(",", analyzer.Calls));
}
void Process(params object[] items) {
diff --git a/source/fitSharpTest/NUnit/Slim/ComposeOperatorsTest.cs b/source/fitSharpTest/NUnit/Slim/ComposeOperatorsTest.cs
index 58798c65..23923606 100644
--- a/source/fitSharpTest/NUnit/Slim/ComposeOperatorsTest.cs
+++ b/source/fitSharpTest/NUnit/Slim/ComposeOperatorsTest.cs
@@ -14,6 +14,7 @@
using fitSharp.Slim.Service;
using fitSharp.Test.Double.Slim;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Slim {
[TestFixture] public class ComposeOperatorsTest {
@@ -51,30 +52,30 @@ [Test] public void BooleanFalseIsComposed() {
[Test] [SetCulture("en-US")] public void ListIsComposedAsTree() {
processor.AddOperator(new ComposeDefault());
var result = Compose(new ComposeList(), new List {"a", 1.23}, typeof (List));
- Assert.IsNotNull(result);
- Assert.AreEqual(2, result.Branches.Count);
- Assert.AreEqual("a", result.ValueAt(0));
- Assert.AreEqual("1.23", result.ValueAt(1));
+ ClassicAssert.IsNotNull(result);
+ ClassicAssert.AreEqual(2, result.Branches.Count);
+ ClassicAssert.AreEqual("a", result.ValueAt(0));
+ ClassicAssert.AreEqual("1.23", result.ValueAt(1));
}
[Test] [SetCulture("en-US")] public void ArrayIsComposedAsTree() {
processor.AddOperator(new ComposeDefault());
var result = Compose(new ComposeList(), new object[] {"a", 1.23}, typeof (List));
- Assert.IsNotNull(result);
- Assert.AreEqual(2, result.Branches.Count);
- Assert.AreEqual("a", result.ValueAt(0));
- Assert.AreEqual("1.23", result.ValueAt(1));
+ ClassicAssert.IsNotNull(result);
+ ClassicAssert.AreEqual(2, result.Branches.Count);
+ ClassicAssert.AreEqual("a", result.ValueAt(0));
+ ClassicAssert.AreEqual("1.23", result.ValueAt(1));
}
[Test] public void NestedListIsComposedAsTree() {
processor.AddOperator(new ComposeDefault());
processor.AddOperator(new ComposeList());
var result = Compose(new ComposeList(), new List {"a", new List {"b", "c"}}, typeof (List));
- Assert.IsNotNull(result);
- Assert.AreEqual(2, result.Branches.Count);
- Assert.AreEqual("a", result.ValueAt(0));
- Assert.AreEqual("b", result.ValueAt(1, 0));
- Assert.AreEqual("c", result.ValueAt(1, 1));
+ ClassicAssert.IsNotNull(result);
+ ClassicAssert.AreEqual(2, result.Branches.Count);
+ ClassicAssert.AreEqual("a", result.ValueAt(0));
+ ClassicAssert.AreEqual("b", result.ValueAt(1, 0));
+ ClassicAssert.AreEqual("c", result.ValueAt(1, 1));
}
[Test] public void ExceptionIsComposed() {
@@ -113,7 +114,7 @@ [Test] public void StopSuiteExceptionIsComposed() {
Tree Compose(ComposeOperator composeOperator, object instance, Type type) {
var compose = (SlimOperator)composeOperator;
compose.Processor = processor;
- Assert.IsTrue(composeOperator.CanCompose(new TypedValue(instance, type)));
+ ClassicAssert.IsTrue(composeOperator.CanCompose(new TypedValue(instance, type)));
return composeOperator.Compose(new TypedValue(instance, type));
}
@@ -124,9 +125,9 @@ void CheckExceptionCompose(Exception exception, string expected) {
void CheckCompose(ComposeOperator composeOperator, object instance, Type type, object expected) {
var compose = (SlimOperator)composeOperator;
compose.Processor = processor;
- Assert.IsTrue(composeOperator.CanCompose(new TypedValue(instance, type)));
+ ClassicAssert.IsTrue(composeOperator.CanCompose(new TypedValue(instance, type)));
Tree result = composeOperator.Compose(new TypedValue(instance, type));
- Assert.AreEqual(expected, result.Value);
+ ClassicAssert.AreEqual(expected, result.Value);
}
class MyStopTestException: Exception {}
diff --git a/source/fitSharpTest/NUnit/Slim/ConverterTest.cs b/source/fitSharpTest/NUnit/Slim/ConverterTest.cs
index 71e25807..4ac9612e 100644
--- a/source/fitSharpTest/NUnit/Slim/ConverterTest.cs
+++ b/source/fitSharpTest/NUnit/Slim/ConverterTest.cs
@@ -8,6 +8,7 @@
using fitSharp.Slim.Service;
using fitSharp.Test.Double.Slim;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Slim {
[TestFixture] public class ConverterTest {
@@ -15,20 +16,20 @@ [TestFixture] public class ConverterTest {
[Test] public void CustomTypeIsParsed() {
var converter = new CustomConverter {Processor = processor};
- Assert.IsTrue(converter.CanParse(typeof(CustomClass), TypedValue.Void, new TreeList("info")));
+ ClassicAssert.IsTrue(converter.CanParse(typeof(CustomClass), TypedValue.Void, new TreeList("info")));
TypedValue parseResult = converter.Parse(typeof(CustomClass), TypedValue.Void, new TreeList("info"));
var result = parseResult.Value as CustomClass;
- Assert.IsNotNull(result);
- Assert.AreEqual("custominfo", result.Info);
+ ClassicAssert.IsNotNull(result);
+ ClassicAssert.AreEqual("custominfo", result.Info);
}
[Test] public void CustomTypeIsComposed() {
var converter = new CustomConverter();
- Assert.IsTrue(converter.CanCompose(new TypedValue(new CustomClass {Info = "stuff"})));
+ ClassicAssert.IsTrue(converter.CanCompose(new TypedValue(new CustomClass {Info = "stuff"})));
Tree composeResult = converter.Compose(new TypedValue(new CustomClass {Info = "stuff"}));
var result = composeResult.Value;
- Assert.IsNotNull(result);
- Assert.AreEqual("mystuff", result);
+ ClassicAssert.IsNotNull(result);
+ ClassicAssert.AreEqual("mystuff", result);
}
class CustomConverter: Converter {
diff --git a/source/fitSharpTest/NUnit/Slim/DocumentTest.cs b/source/fitSharpTest/NUnit/Slim/DocumentTest.cs
index 189c4129..93281ee7 100644
--- a/source/fitSharpTest/NUnit/Slim/DocumentTest.cs
+++ b/source/fitSharpTest/NUnit/Slim/DocumentTest.cs
@@ -7,19 +7,20 @@
using fitSharp.Slim.Model;
using fitSharp.Slim.Service;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Slim {
[TestFixture] public class DocumentTest {
[Test] public void ParsesBracketsAsList() {
fitSharp.Slim.Service.Document document = ParseAsList("[000002:000004:some:000005:stuff]", 2);
- Assert.AreEqual("some",document.Content.ValueAt(0));
- Assert.AreEqual("stuff",document.Content.ValueAt(1));
+ ClassicAssert.AreEqual("some",document.Content.ValueAt(0));
+ ClassicAssert.AreEqual("stuff",document.Content.ValueAt(1));
}
static fitSharp.Slim.Service.Document ParseAsList(string input, int expectedCount) {
fitSharp.Slim.Service.Document document = fitSharp.Slim.Service.Document.Parse(input);
- Assert.AreEqual(expectedCount, document.Content.Branches.Count);
+ ClassicAssert.AreEqual(expectedCount, document.Content.Branches.Count);
return document;
}
@@ -33,8 +34,8 @@ [Test] public void ParsesBracketsWithoutCountAsString() {
static void ParsesAsString(string input) {
fitSharp.Slim.Service.Document document = fitSharp.Slim.Service.Document.Parse(input);
- Assert.IsTrue(document.Content.IsLeaf);
- Assert.AreEqual(input,document.Content.Value);
+ ClassicAssert.IsTrue(document.Content.IsLeaf);
+ ClassicAssert.AreEqual(input,document.Content.Value);
}
[Test] public void ParsesBracketsWithShortCountAsString() {
@@ -42,14 +43,14 @@ [Test] public void ParsesBracketsWithShortCountAsString() {
}
[Test] public void ComposesList() {
- Assert.AreEqual(new Document(new SlimTree().AddBranches("hello", "world")).ToString(),
+ ClassicAssert.AreEqual(new Document(new SlimTree().AddBranches("hello", "world")).ToString(),
"[000002:000005:hello:000005:world:]");
}
[Test] public void ComposesNestedList() {
- Assert.AreEqual(new Document(new SlimTree().AddBranch(new SlimTree().AddBranches("hello", "world"))).ToString(),
+ ClassicAssert.AreEqual(new Document(new SlimTree().AddBranch(new SlimTree().AddBranches("hello", "world"))).ToString(),
"[000001:000035:[000002:000005:hello:000005:world:]:]");
- Assert.AreEqual(new Document(new SlimTree().AddBranch(new SlimLeaf("[000002:000005:hello:000005:world:]"))).ToString(),
+ ClassicAssert.AreEqual(new Document(new SlimTree().AddBranch(new SlimLeaf("[000002:000005:hello:000005:world:]"))).ToString(),
"[000001:000035:[000002:000005:hello:000005:world:]:]");
}
}
diff --git a/source/fitSharpTest/NUnit/Slim/ExecuteOperatorsTest.cs b/source/fitSharpTest/NUnit/Slim/ExecuteOperatorsTest.cs
index 1bf99cf9..d3fe3799 100644
--- a/source/fitSharpTest/NUnit/Slim/ExecuteOperatorsTest.cs
+++ b/source/fitSharpTest/NUnit/Slim/ExecuteOperatorsTest.cs
@@ -10,6 +10,7 @@
using fitSharp.Slim.Service;
using fitSharp.Test.Double.Slim;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Slim {
[TestFixture] public class ExecuteOperatorsTest {
@@ -38,7 +39,7 @@ [Test] public void ExecuteMakeUsesSymbolInClassName() {
var executeMake = new ExecuteMake { Processor = processor };
var input = new SlimTree().AddBranchValue("step").AddBranchValue("make").AddBranchValue("variable").AddBranchValue("fitSharp.Test.$symbol.Slim.SampleClass");
ExecuteOperation(executeMake, input, 2);
- Assert.IsTrue(processor.Get().GetValue("variable") is SampleClass);
+ ClassicAssert.IsTrue(processor.Get().GetValue("variable") is SampleClass);
}
[Test] public void ExecuteMakeUsesSymbolAsFullClassName() {
@@ -46,7 +47,7 @@ [Test] public void ExecuteMakeUsesSymbolAsFullClassName() {
var executeMake = new ExecuteMake { Processor = processor };
var input = new SlimTree().AddBranchValue("step").AddBranchValue("make").AddBranchValue("variable").AddBranchValue("$symbol");
ExecuteOperation(executeMake, input, 2);
- Assert.IsTrue(processor.Get().GetValue("variable") is SampleClass);
+ ClassicAssert.IsTrue(processor.Get().GetValue("variable") is SampleClass);
}
[Test] public void ExecuteMakeUsesSymbolAsObject() {
@@ -55,7 +56,7 @@ [Test] public void ExecuteMakeUsesSymbolAsObject() {
var executeMake = new ExecuteMake { Processor = processor };
var input = new SlimTree().AddBranchValue("step").AddBranchValue("make").AddBranchValue("variable").AddBranchValue("$symbol");
ExecuteOperation(executeMake, input, 2);
- Assert.AreEqual(newClass, processor.Get().GetValue("variable"));
+ ClassicAssert.AreEqual(newClass, processor.Get().GetValue("variable"));
}
[Test] public void ExecuteMakeLibraryIsStacked() {
@@ -63,10 +64,10 @@ [Test] public void ExecuteMakeLibraryIsStacked() {
var input = new SlimTree().AddBranchValue("step").AddBranchValue("make").AddBranchValue("librarystuff").AddBranchValue("fitSharp.Test.NUnit.Slim.SampleClass");
ExecuteOperation(executeMake, input, 2);
foreach (var libraryInstance in processor.LibraryInstances) {
- Assert.IsTrue(libraryInstance.Value is SampleClass);
+ ClassicAssert.IsTrue(libraryInstance.Value is SampleClass);
return;
}
- Assert.Fail();
+ ClassicAssert.Fail();
}
[Test] public void ExecuteCallBadMethodReturnsException() {
@@ -82,14 +83,14 @@ [Test] public void ExecuteCallUsesExtensionMethod() {
var executeCall = new ExecuteCall { Processor = processor };
var input = new SlimTree().AddBranchValue("step").AddBranchValue("call").AddBranchValue("variable").AddBranchValue("increase.in.sampleextension").AddBranchValue("2");
ExecuteOperation(executeCall, input, 2);
- Assert.AreEqual("3", result.ValueAt(1));
+ ClassicAssert.AreEqual("3", result.ValueAt(1));
}
[Test] public void ExecuteImportAddsNamespace() {
var executeImport = new ExecuteImport { Processor = processor };
var input = new SlimTree().AddBranchValue("step").AddBranchValue("import").AddBranchValue("fitSharp.Test.NUnit.Slim");
ExecuteOperation(executeImport, input, 2);
- Assert.IsTrue(processor.Create("SampleClass", new SlimTree()).Value is SampleClass);
+ ClassicAssert.IsTrue(processor.Create("SampleClass", new SlimTree()).Value is SampleClass);
}
[Test] public void ExecuteCallAndAssignSavesSymbol() {
@@ -99,8 +100,8 @@ [Test] public void ExecuteCallAndAssignSavesSymbol() {
new SlimTree().AddBranchValue("step").AddBranchValue("callAndAssign").AddBranchValue("symbol").AddBranchValue(
"variable").AddBranchValue("sampleMethod");
ExecuteOperation(executeCallAndAssign, input, 2);
- Assert.AreEqual("testresult", result.ValueAt(1));
- Assert.AreEqual("testresult", processor.Get().GetValue("symbol"));
+ ClassicAssert.AreEqual("testresult", result.ValueAt(1));
+ ClassicAssert.AreEqual("testresult", processor.Get().GetValue("symbol"));
}
[Test] public void ExecuteCallUsesDomainAdapter() {
@@ -108,7 +109,7 @@ [Test] public void ExecuteCallUsesDomainAdapter() {
var executeCall = new ExecuteCall { Processor = processor };
var input = new SlimTree().AddBranchValue("step").AddBranchValue("call").AddBranchValue("variable").AddBranchValue("DomainMethod");
ExecuteOperation(executeCall, input, 2);
- Assert.AreEqual("domainstuff", result.ValueAt(1));
+ ClassicAssert.AreEqual("domainstuff", result.ValueAt(1));
}
[Test] public void ExecuteCallOnMissingInstanceUsesLibrary() {
@@ -119,13 +120,13 @@ [Test] public void ExecuteCallOnMissingInstanceUsesLibrary() {
input = new SlimTree().AddBranchValue("step").AddBranchValue("call").AddBranchValue("garbage").AddBranchValue("SampleMethod");
SampleClass.MethodCount = 0;
ExecuteOperation(executeCall, input, 2);
- Assert.AreEqual(1, SampleClass.MethodCount);
+ ClassicAssert.AreEqual(1, SampleClass.MethodCount);
}
[Test] public void ExecuteGetFixtureReturnsActorInstance() {
MakeSampleClass("sampleData");
CallActorMethod("getFixture");
- Assert.AreEqual("Sample=sampleData", result.ValueAt(1));
+ ClassicAssert.AreEqual("Sample=sampleData", result.ValueAt(1));
}
[Test] public void ExecutePushAndPopFixtureReturnsActorInstance() {
@@ -134,7 +135,7 @@ [Test] public void ExecutePushAndPopFixtureReturnsActorInstance() {
MakeSampleClass("otherData");
CallActorMethod("popFixture");
CallActorMethod("info");
- Assert.AreEqual("sampleData", result.ValueAt(1));
+ ClassicAssert.AreEqual("sampleData", result.ValueAt(1));
}
[Test]
@@ -145,8 +146,8 @@ public void ExecuteAssignSavesSymol() {
new SlimTree().AddBranchValue("step").AddBranchValue("assign").AddBranchValue("symbol").AddBranchValue(
"value");
ExecuteOperation(executeAssign, input, 2);
- Assert.AreEqual("OK", result.ValueAt(1));
- Assert.AreEqual("value", processor.Get().GetValue("symbol"));
+ ClassicAssert.AreEqual("OK", result.ValueAt(1));
+ ClassicAssert.AreEqual("value", processor.Get().GetValue("symbol"));
}
void MakeSampleClass(string sampleData) {
@@ -167,13 +168,13 @@ void ExecuteOperation(InvokeOperator executeOperator, Tree input
executeResult = executeOperator.Invoke(new TypedValue(new SlimInstruction()), new MemberName(string.Empty), input);
}
result = executeResult.GetValue>();
- Assert.IsFalse(result.IsLeaf);
- Assert.AreEqual(branchCount, result.Branches.Count);
- Assert.AreEqual("step", result.ValueAt(0));
+ ClassicAssert.IsFalse(result.IsLeaf);
+ ClassicAssert.AreEqual(branchCount, result.Branches.Count);
+ ClassicAssert.AreEqual("step", result.ValueAt(0));
}
void CheckForException(string exceptionText) {
- Assert.IsTrue(result.ValueAt(1).StartsWith("__EXCEPTION__:" + exceptionText));
+ ClassicAssert.IsTrue(result.ValueAt(1).StartsWith("__EXCEPTION__:" + exceptionText));
}
Service processor;
diff --git a/source/fitSharpTest/NUnit/Slim/InterpreterTest.cs b/source/fitSharpTest/NUnit/Slim/InterpreterTest.cs
index 425b0944..278ebfa0 100644
--- a/source/fitSharpTest/NUnit/Slim/InterpreterTest.cs
+++ b/source/fitSharpTest/NUnit/Slim/InterpreterTest.cs
@@ -8,6 +8,7 @@
using fitSharp.Slim.Service;
using fitSharp.Test.Double.Slim;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Slim {
[TestFixture] public class InterpreterTest {
@@ -25,7 +26,7 @@ [Test] public void MultipleStepsAreExecuted() {
.ExecuteMethod("samplemethod");
SampleClass.MethodCount = 0;
Execute(instructions.InstructionString);
- Assert.AreEqual(2, SampleClass.MethodCount);
+ ClassicAssert.AreEqual(2, SampleClass.MethodCount);
}
[Test] public void StopTestExceptionSkipsRemainingSteps() {
@@ -36,7 +37,7 @@ [Test] public void StopTestExceptionSkipsRemainingSteps() {
.ExecuteMethod("samplemethod");
SampleClass.MethodCount = 0;
Execute(instructions.InstructionString);
- Assert.AreEqual(1, SampleClass.MethodCount);
+ ClassicAssert.AreEqual(1, SampleClass.MethodCount);
}
[Test] public void StopSuiteExceptionSkipsRemainingSteps() {
@@ -47,11 +48,11 @@ [Test] public void StopSuiteExceptionSkipsRemainingSteps() {
.ExecuteMethod("samplemethod");
SampleClass.MethodCount = 0;
Execute(instructions.InstructionString);
- Assert.AreEqual(1, SampleClass.MethodCount);
+ ClassicAssert.AreEqual(1, SampleClass.MethodCount);
}
[Test] public void EmptyInstructionReturnEmptyList() {
- Assert.AreEqual("Slim -- V0.5\n000009:[000000:]", Execute("[000000:]"));
+ ClassicAssert.AreEqual("Slim -- V0.5\n000009:[000000:]", Execute("[000000:]"));
}
[Test] public void ExecutesMethodOnLibraryInstance() {
@@ -61,7 +62,7 @@ [Test] public void ExecutesMethodOnLibraryInstance() {
.ExecuteMethod("samplemethod");
SampleClass.MethodCount = 0;
Execute(instructions.InstructionString);
- Assert.AreEqual(1, SampleClass.MethodCount);
+ ClassicAssert.AreEqual(1, SampleClass.MethodCount);
}
string Execute(string instructionString) {
diff --git a/source/fitSharpTest/NUnit/Slim/InvokeLibraryTest.cs b/source/fitSharpTest/NUnit/Slim/InvokeLibraryTest.cs
index a94bc232..c14c99cf 100644
--- a/source/fitSharpTest/NUnit/Slim/InvokeLibraryTest.cs
+++ b/source/fitSharpTest/NUnit/Slim/InvokeLibraryTest.cs
@@ -8,6 +8,7 @@
using fitSharp.Slim.Operators;
using fitSharp.Test.Double.Slim;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Slim {
[TestFixture] public class InvokeLibraryTest {
@@ -17,7 +18,7 @@ [Test] public void SearchesLibraryInstancesForMethod() {
var runtime = new InvokeLibrary { Processor = processor };
SampleClass.MethodCount = 0;
runtime.Invoke(new TypedValue("stuff"), new MemberName("samplemethod"), new TreeList());
- Assert.AreEqual(1, SampleClass.MethodCount);
+ ClassicAssert.AreEqual(1, SampleClass.MethodCount);
}
}
}
diff --git a/source/fitSharpTest/NUnit/Slim/MessengerTest.cs b/source/fitSharpTest/NUnit/Slim/MessengerTest.cs
index 66e71e0e..e1c5ab58 100644
--- a/source/fitSharpTest/NUnit/Slim/MessengerTest.cs
+++ b/source/fitSharpTest/NUnit/Slim/MessengerTest.cs
@@ -7,6 +7,7 @@
using fitSharp.Samples;
using fitSharp.Slim.Service;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Slim {
@@ -15,28 +16,28 @@ public class MessengerTest {
[Test]
public void WritesVersion() {
- Assert.AreEqual("Slim -- V0.5\n", port.Output);
+ ClassicAssert.AreEqual("Slim -- V0.5\n", port.Output);
}
[Test]
public void WritesMessageWithLengthPrefix() {
port.Clear();
messenger.Write("hello");
- Assert.AreEqual("000005:hello", port.Output);
+ ClassicAssert.AreEqual("000005:hello", port.Output);
}
[Test]
public void ReadsMessageWithLengthPrefix() {
port.AddInput("000005:hello");
- Assert.AreEqual("hello", messenger.Read());
+ ClassicAssert.AreEqual("hello", messenger.Read());
}
[Test]
public void AtEndWhenByeRead() {
port.AddInput("000003:bye");
messenger.Read();
- Assert.IsTrue(messenger.IsEnd);
- Assert.IsFalse(port.IsOpen);
+ ClassicAssert.IsTrue(messenger.IsEnd);
+ ClassicAssert.IsFalse(port.IsOpen);
}
/* slow tests
@@ -44,13 +45,13 @@ public void AtEndWhenByeRead() {
public void WritesLongMessageWithLengthPrefix() {
session.Output = string.Empty;
messenger.Write(new string('a', 1000000));
- Assert.IsTrue(session.Output.StartsWith("1000000:a"));
+ ClassicAssert.IsTrue(session.Output.StartsWith("1000000:a"));
}
[Test]
public void ReadsLongMessageWithLengthPrefix() {
session.Input = "1000000:" + new string('a', 1000000);
- Assert.AreEqual(1000000, messenger.Read().Length);
+ ClassicAssert.AreEqual(1000000, messenger.Read().Length);
}*/
[SetUp]
diff --git a/source/fitSharpTest/NUnit/Slim/ParseOperatorsTest.cs b/source/fitSharpTest/NUnit/Slim/ParseOperatorsTest.cs
index 34e237af..b804690c 100644
--- a/source/fitSharpTest/NUnit/Slim/ParseOperatorsTest.cs
+++ b/source/fitSharpTest/NUnit/Slim/ParseOperatorsTest.cs
@@ -13,6 +13,7 @@
using fitSharp.Slim.Service;
using fitSharp.Test.Double.Slim;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Slim {
@@ -37,99 +38,99 @@ [SetUp] public void SetUp() {
public void ParseSymbolReplacesWithValueAsImplementation() {
var testvalue = ConcreteObject.NewInstance();
processor.Get().Save("symbol", testvalue);
- Assert.AreEqual(testvalue, Parse(new ParseSymbol { Processor = processor }, typeof(ConcreteObject), new SlimLeaf("$symbol")));
+ ClassicAssert.AreEqual(testvalue, Parse(new ParseSymbol { Processor = processor }, typeof(ConcreteObject), new SlimLeaf("$symbol")));
}
[Test]
public void ParseSymbolReplacesWithValueAsInterface() {
var testvalue = ConcreteObject.NewInstance();
processor.Get().Save("symbol", testvalue);
- Assert.AreEqual(testvalue, Parse(new ParseSymbol { Processor = processor }, typeof(IObject), new SlimLeaf("$symbol")));
+ ClassicAssert.AreEqual(testvalue, Parse(new ParseSymbol { Processor = processor }, typeof(IObject), new SlimLeaf("$symbol")));
}
[Test] public void ParseSymbolReplacesWithValue() {
processor.Get().Save("symbol", "testvalue");
- Assert.AreEqual("testvalue", Parse(new ParseSymbol { Processor = processor }, typeof(object), new SlimLeaf("$symbol")));
+ ClassicAssert.AreEqual("testvalue", Parse(new ParseSymbol { Processor = processor }, typeof(object), new SlimLeaf("$symbol")));
}
[Test] public void ParseSymbolReplacesEmbeddedValues() {
processor.Get().Save("symbol1", "test");
processor.Get().Save("symbol2", "value");
- Assert.AreEqual("-testvalue-", Parse(new ParseSymbol { Processor = processor }, typeof(object), new SlimLeaf("-$symbol1$symbol2-")));
+ ClassicAssert.AreEqual("-testvalue-", Parse(new ParseSymbol { Processor = processor }, typeof(object), new SlimLeaf("-$symbol1$symbol2-")));
}
[Test] public void ParseSymbolIgnoresUndefinedSymbols() {
- Assert.AreEqual("$symbol", processor.Parse(typeof(object), TypedValue.Void, new SlimLeaf("$symbol")).ValueString);
+ ClassicAssert.AreEqual("$symbol", processor.Parse(typeof(object), TypedValue.Void, new SlimLeaf("$symbol")).ValueString);
}
[Test] public void ParseSymbolIgnoresEmbeddedUndefinedSymbols() {
- Assert.AreEqual("-$symbol-", processor.Parse(typeof(object), TypedValue.Void, new SlimLeaf("-$symbol-")).ValueString);
+ ClassicAssert.AreEqual("-$symbol-", processor.Parse(typeof(object), TypedValue.Void, new SlimLeaf("-$symbol-")).ValueString);
}
[Test] public void ParseSymbolWithDoubleDollar() {
processor.Get().Save("symbol", "testvalue");
- Assert.AreEqual("$testvalue", processor.Parse(typeof(object), TypedValue.Void, new SlimLeaf("$$symbol")).ValueString);
+ ClassicAssert.AreEqual("$testvalue", processor.Parse(typeof(object), TypedValue.Void, new SlimLeaf("$$symbol")).ValueString);
}
[Test] public void ParseSymbolEmbeddedWithDoubleDollar() {
processor.Get().Save("symbol", "testvalue");
- Assert.AreEqual("-$testvaluetestvalue-", processor.Parse(typeof(object), TypedValue.Void, new SlimLeaf("-$$symbol$symbol-")).ValueString);
+ ClassicAssert.AreEqual("-$testvaluetestvalue-", processor.Parse(typeof(object), TypedValue.Void, new SlimLeaf("-$$symbol$symbol-")).ValueString);
}
[Test] public void ParseSymbolMatchingRequestedType() {
processor.Get().Save("symbol", AppDomain.CurrentDomain);
- Assert.AreEqual(AppDomain.CurrentDomain, processor.Parse(typeof(AppDomain), TypedValue.Void, new SlimLeaf("$symbol")).Value);
+ ClassicAssert.AreEqual(AppDomain.CurrentDomain, processor.Parse(typeof(AppDomain), TypedValue.Void, new SlimLeaf("$symbol")).Value);
}
[Test] public void LeafIsParsedForList() {
var list =
Parse(new ParseList{ Processor = processor }, typeof (List), new SlimLeaf("[5, 4]")) as List;
- Assert.IsNotNull(list);
- Assert.AreEqual(2, list.Count);
- Assert.AreEqual(5, list[0]);
- Assert.AreEqual(4, list[1]);
+ ClassicAssert.IsNotNull(list);
+ ClassicAssert.AreEqual(2, list.Count);
+ ClassicAssert.AreEqual(5, list[0]);
+ ClassicAssert.AreEqual(4, list[1]);
}
[Test] public void TreeIsParsedForList() {
var list =
Parse(new ParseList{ Processor = processor }, typeof (List), new SlimTree().AddBranchValue("5").AddBranchValue("4")) as List;
- Assert.IsNotNull(list);
- Assert.AreEqual(2, list.Count);
- Assert.AreEqual(5, list[0]);
- Assert.AreEqual(4, list[1]);
+ ClassicAssert.IsNotNull(list);
+ ClassicAssert.AreEqual(2, list.Count);
+ ClassicAssert.AreEqual(5, list[0]);
+ ClassicAssert.AreEqual(4, list[1]);
}
[Test] public void LeafIsParsedForArray() {
var list =
Parse(new ParseList{ Processor = processor }, typeof (int[]), new SlimLeaf("[5, 4]")) as int[];
- Assert.IsNotNull(list);
- Assert.AreEqual(2, list.Length);
- Assert.AreEqual(5, list[0]);
- Assert.AreEqual(4, list[1]);
+ ClassicAssert.IsNotNull(list);
+ ClassicAssert.AreEqual(2, list.Length);
+ ClassicAssert.AreEqual(5, list[0]);
+ ClassicAssert.AreEqual(4, list[1]);
}
[Test] public void ParsesEnumType() {
- Assert.AreEqual(BindingFlags.Public,
+ ClassicAssert.AreEqual(BindingFlags.Public,
processor.Parse(typeof (BindingFlags), TypedValue.Void,
new SlimLeaf("Public")).Value);
}
[Test] public void ParsesIntegerForNullableInt() {
- Assert.AreEqual(1, processor.Parse(typeof (int?), TypedValue.Void, new SlimLeaf("1")).Value);
+ ClassicAssert.AreEqual(1, processor.Parse(typeof (int?), TypedValue.Void, new SlimLeaf("1")).Value);
}
[Test] public void ParsesDictionary() {
var dictionary = processor.Parse(typeof (Dictionary), TypedValue.Void,
new SlimLeaf("")).GetValue>();
- Assert.AreEqual("value", dictionary["key"]);
+ ClassicAssert.AreEqual("value", dictionary["key"]);
}
[Test] [SetCulture("es-ES")] public void ParsesWithCurrentCulture() {
- Assert.AreEqual(1.001, processor.Parse(typeof (double), TypedValue.Void, new SlimLeaf("1,001")).Value);
+ ClassicAssert.AreEqual(1.001, processor.Parse(typeof (double), TypedValue.Void, new SlimLeaf("1,001")).Value);
}
static object Parse(ParseOperator parseOperator, Type type, Tree parameters) {
- Assert.IsTrue(parseOperator.CanParse(type, TypedValue.Void, parameters));
+ ClassicAssert.IsTrue(parseOperator.CanParse(type, TypedValue.Void, parameters));
TypedValue result = parseOperator.Parse(type, TypedValue.Void, parameters);
return result.Value;
}
diff --git a/source/fitSharpTest/NUnit/Slim/ReportTest.cs b/source/fitSharpTest/NUnit/Slim/ReportTest.cs
index 4988a890..c667b731 100644
--- a/source/fitSharpTest/NUnit/Slim/ReportTest.cs
+++ b/source/fitSharpTest/NUnit/Slim/ReportTest.cs
@@ -9,6 +9,7 @@
using fitSharp.Machine.Engine;
using fitSharp.Slim.Analysis;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Slim {
[TestFixture]
@@ -38,7 +39,7 @@ static void AssertReport(string input, string expected) {
var applicationUnderTest = new ApplicationUnderTest();
applicationUnderTest.AddNamespace("fitSharp.Test.NUnit.Slim");
Report.RunReport(applicationUnderTest, new StringReader(input), new StringWriter(output));
- Assert.AreEqual(expected, output.ToString());
+ ClassicAssert.AreEqual(expected, output.ToString());
}
static readonly string pageInstructions1 = "MyPageOne|[000002:000087:[000004:000015:scriptTable_0_0:000004:make:000016:scriptTableActor:000011:SampleClass:]:000088:[000004:000015:scriptTable_0_1:000004:call:000016:scriptTableActor:000012:sampleMethod:]:]" + Environment.NewLine;
diff --git a/source/fitSharpTest/NUnit/Slim/ServiceTest.cs b/source/fitSharpTest/NUnit/Slim/ServiceTest.cs
index d7c0f3a1..08a074f3 100644
--- a/source/fitSharpTest/NUnit/Slim/ServiceTest.cs
+++ b/source/fitSharpTest/NUnit/Slim/ServiceTest.cs
@@ -11,6 +11,7 @@
using fitSharp.Slim.Service;
using fitSharp.Test.Double.Slim;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Slim {
[TestFixture] public class ServiceTest {
@@ -24,7 +25,7 @@ [Test] public void InstanceIsCreated() {
SampleClass.Count = 0;
var statement = new Instructions().MakeVariable("variable", typeof (SampleClass));
DoInstruction(statement);
- Assert.AreEqual(1, SampleClass.Count);
+ ClassicAssert.AreEqual(1, SampleClass.Count);
}
private TypedValue DoInstruction(Instructions statement) {
@@ -37,14 +38,14 @@ [Test] public void OperatorIsAddedFromConfiguration() {
var statement = new Instructions().MakeCommand("sampleCommand");
service = new Service(configuration);
var result = DoInstruction(statement).GetValue>();
- Assert.AreEqual("sampleResult", result.ValueAt(1));
+ ClassicAssert.AreEqual("sampleResult", result.ValueAt(1));
}
[Test] public void ParseSymbolIsDoneFirst() {
service.Get().Save("symbol", "input");
service.AddOperator(new SampleConverter());
var value = (SampleClass)service.Parse(typeof(SampleClass), TypedValue.Void, new SlimLeaf("$symbol")).Value;
- Assert.AreEqual("custominput", value.Info);
+ ClassicAssert.AreEqual("custominput", value.Info);
}
[Test] public void CustomComposeIsCalled() {
@@ -53,7 +54,7 @@ [Test] public void CustomComposeIsCalled() {
DoInstruction(statement);
statement = new Instructions().ExecuteMethod("makesample");
var result = DoInstruction(statement).GetValue();
- Assert.AreEqual("mysample", result.ValueAt(1));
+ ClassicAssert.AreEqual("mysample", result.ValueAt(1));
}
class SampleConverter: Converter {
diff --git a/source/fitSharpTest/NUnit/Slim/SlimTreeTest.cs b/source/fitSharpTest/NUnit/Slim/SlimTreeTest.cs
index 39367e55..7543db7a 100644
--- a/source/fitSharpTest/NUnit/Slim/SlimTreeTest.cs
+++ b/source/fitSharpTest/NUnit/Slim/SlimTreeTest.cs
@@ -8,6 +8,7 @@
using fitSharp.Machine.Model;
using fitSharp.Slim.Model;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fitSharp.Test.NUnit.Slim {
[TestFixture] public class SlimTreeTest {
@@ -60,10 +61,10 @@ static void AssertParsed(string input, IList results) {
}
static void ValidateTree(Tree result, IList results) {
- Assert.AreEqual(results.Count, result.Branches.Count);
+ ClassicAssert.AreEqual(results.Count, result.Branches.Count);
for (var i = 0; i < results.Count; i++) {
var itemList = results[i] as IList;
- if (itemList == null) Assert.AreEqual(results[i], result.ValueAt(i));
+ if (itemList == null) ClassicAssert.AreEqual(results[i], result.ValueAt(i));
else ValidateTree(result.Branches[i], itemList);
}
}
@@ -73,9 +74,9 @@ static void AssertParseError(string input) {
SlimTree.Parse(input);
}
catch (FormatException) {
- Assert.Pass();
+ ClassicAssert.Pass();
}
- Assert.Fail();
+ ClassicAssert.Fail();
}
}
}
diff --git a/source/fitSharpTest/fitSharpTest.csproj b/source/fitSharpTest/fitSharpTest.csproj
index 5e1910a5..51ae4a1c 100644
--- a/source/fitSharpTest/fitSharpTest.csproj
+++ b/source/fitSharpTest/fitSharpTest.csproj
@@ -1,6 +1,6 @@

- net48;net6.0;net6.0-windows;net7.0;net7.0-windows;net8.0;net8.0-windows
+ net48;net8.0;net8.0-windows;net9.0;net9.0-windows
fitSharp.Test
false
false
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/source/fitSharpTest/fitSharpTestL.csproj b/source/fitSharpTest/fitSharpTestL.csproj
index ce48ea6c..0f6d0daf 100644
--- a/source/fitSharpTest/fitSharpTestL.csproj
+++ b/source/fitSharpTest/fitSharpTestL.csproj
@@ -1,6 +1,6 @@

- net6.0
+ net8.0
fitSharp.Test
false
false
diff --git a/source/fitTest/NUnit/ActionFixtureTest.cs b/source/fitTest/NUnit/ActionFixtureTest.cs
index 98143211..0189545e 100644
--- a/source/fitTest/NUnit/ActionFixtureTest.cs
+++ b/source/fitTest/NUnit/ActionFixtureTest.cs
@@ -1,4 +1,4 @@
-// Copyright © 2010 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2010 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -10,6 +10,7 @@
using fitSharp.Machine.Model;
using Moq;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
using TestStatus=fitSharp.Fit.Model.TestStatus;
namespace fit.Test.NUnit {
@@ -51,8 +52,8 @@ public void TestStart()
table = BuildTable("ActionFixture");
var fixture = new ActionFixture { Processor = new Service.Service(memory) };
fixture.DoTable(table);
- Assert.AreEqual(0, fixture.TestStatus.Counts.GetCount(TestStatus.Exception), table.ToString());
- Assert.IsNotNull(fixture.GetTargetObject());
+ ClassicAssert.AreEqual(0, fixture.TestStatus.Counts.GetCount(TestStatus.Exception), table.ToString());
+ ClassicAssert.IsNotNull(fixture.GetTargetObject());
}
[Test]
@@ -61,11 +62,11 @@ public void TestCheck()
table = BuildTable("ActionFixture");
var fixture = new ActionFixture{ Processor = new Service.Service(memory) };
fixture.DoTable(table);
- Assert.AreEqual(0, fixture.TestStatus.Counts.GetCount(TestStatus.Exception), table.ToString());
+ ClassicAssert.AreEqual(0, fixture.TestStatus.Counts.GetCount(TestStatus.Exception), table.ToString());
var countFixture = (CountFixture)fixture.GetTargetObject();
int actualCount = countFixture.Counter;
- Assert.AreEqual(6, actualCount);
- Assert.AreEqual(4, fixture.TestStatus.Counts.GetCount(TestStatus.Right));
+ ClassicAssert.AreEqual(6, actualCount);
+ ClassicAssert.AreEqual(4, fixture.TestStatus.Counts.GetCount(TestStatus.Right));
}
[Test]
@@ -74,11 +75,11 @@ public void TestCheckOnTimedActionFixture()
table = BuildTable("TimedActionFixture");
var fixture = new ActionFixture{ Processor = new Service.Service(memory) };
fixture.DoTable(table);
- Assert.AreEqual(0, fixture.TestStatus.Counts.GetCount(TestStatus.Exception), table.ToString());
+ ClassicAssert.AreEqual(0, fixture.TestStatus.Counts.GetCount(TestStatus.Exception), table.ToString());
var countFixture = (CountFixture)fixture.GetTargetObject();
int actualCount = countFixture.Counter;
- Assert.AreEqual(6, actualCount);
- Assert.AreEqual(4, countFixture.TestStatus.Counts.GetCount(TestStatus.Right));
+ ClassicAssert.AreEqual(6, actualCount);
+ ClassicAssert.AreEqual(4, countFixture.TestStatus.Counts.GetCount(TestStatus.Right));
}
[Test] public void PressInvokesMethodOnActor() {
diff --git a/source/fitTest/NUnit/BindingTest.cs b/source/fitTest/NUnit/BindingTest.cs
index 3ba52126..61cc3a55 100644
--- a/source/fitTest/NUnit/BindingTest.cs
+++ b/source/fitTest/NUnit/BindingTest.cs
@@ -1,4 +1,4 @@
-// Copyright © 2010 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2010 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -6,6 +6,7 @@
using System;
using fitSharp.Fit.Service;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture]
@@ -19,34 +20,34 @@ public void TestSetterBinding()
BindingOperation bindingOperation = new InputBinding(f.Processor, f, TestUtils.CreateCell("sampleInt"));
bindingOperation.Do(MakeCell("123456"));
- Assert.AreEqual(123456, f.sampleInt);
+ ClassicAssert.AreEqual(123456, f.sampleInt);
bindingOperation.Do(MakeCell("-234567"));
- Assert.AreEqual(-234567, f.sampleInt);
+ ClassicAssert.AreEqual(-234567, f.sampleInt);
bindingOperation = new InputBinding(f.Processor, f, TestUtils.CreateCell("sampleDouble"));
bindingOperation.Do(MakeCell("3.14159"));
- Assert.AreEqual(3.14159, f.sampleDouble);
+ ClassicAssert.AreEqual(3.14159, f.sampleDouble);
bindingOperation = new InputBinding(f.Processor, f, TestUtils.CreateCell("sampleChar"));
bindingOperation.Do(MakeCell("a"));
- Assert.AreEqual('a', f.sampleChar);
+ ClassicAssert.AreEqual('a', f.sampleChar);
bindingOperation = new InputBinding(f.Processor, f, TestUtils.CreateCell("sampleString"));
bindingOperation.Do(MakeCell("xyzzy"));
- Assert.AreEqual("xyzzy", f.sampleString);
+ ClassicAssert.AreEqual("xyzzy", f.sampleString);
bindingOperation = new InputBinding(f.Processor, f, TestUtils.CreateCell("sampleFloat"));
bindingOperation.Do(MakeCell("6.02e23"));
- Assert.AreEqual(6.02e23f, f.sampleFloat, 1e17f);
+ ClassicAssert.AreEqual(6.02e23f, f.sampleFloat, 1e17f);
bindingOperation = new InputBinding(f.Processor, f, TestUtils.CreateCell("sampleByte"));
bindingOperation.Do(MakeCell("123"));
- Assert.AreEqual(123, f.sampleByte);
+ ClassicAssert.AreEqual(123, f.sampleByte);
bindingOperation = new InputBinding(f.Processor, f, TestUtils.CreateCell("sampleShort"));
bindingOperation.Do(MakeCell("12345"));
- Assert.AreEqual(12345, f.sampleShort);
+ ClassicAssert.AreEqual(12345, f.sampleShort);
}
static Parse MakeCell(string cellContent) {
diff --git a/source/fitTest/NUnit/CellHandlerLoaderTest.cs b/source/fitTest/NUnit/CellHandlerLoaderTest.cs
index 99309c4a..11fa66fd 100644
--- a/source/fitTest/NUnit/CellHandlerLoaderTest.cs
+++ b/source/fitTest/NUnit/CellHandlerLoaderTest.cs
@@ -1,4 +1,4 @@
-// Copyright © 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -6,6 +6,7 @@
using fitSharp.Fit.Operators;
using fitSharp.Machine.Model;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture]
@@ -21,10 +22,10 @@ public void TestLoadHandler()
builder.Append("load substring handler ");
builder.Append(" | ");
var service = new Service.Service(configuration);
- Assert.IsFalse(service.Compare(new TypedValue("abc"), TestUtils.CreateCell("..b..")));
+ ClassicAssert.IsFalse(service.Compare(new TypedValue("abc"), TestUtils.CreateCell("..b..")));
var test = builder.MakeStoryTest(service);
test.Execute();
- Assert.IsTrue(service.Compare(new TypedValue("abc"), TestUtils.CreateCell("..b..")));
+ ClassicAssert.IsTrue(service.Compare(new TypedValue("abc"), TestUtils.CreateCell("..b..")));
}
[Test]
@@ -38,10 +39,10 @@ public void TestRemoveHandler()
builder.Append("CellHandlerLoader ");
builder.Append("remove SubstringHandler ");
builder.Append("");
- Assert.IsTrue(new Service.Service(configuration).Compare(new TypedValue("abc"), TestUtils.CreateCell("..b..")));
+ ClassicAssert.IsTrue(new Service.Service(configuration).Compare(new TypedValue("abc"), TestUtils.CreateCell("..b..")));
var test = builder.MakeStoryTest(service);
test.Execute();
- Assert.IsFalse(new Service.Service(configuration).Compare(new TypedValue("abc"), TestUtils.CreateCell("..b..")));
+ ClassicAssert.IsFalse(new Service.Service(configuration).Compare(new TypedValue("abc"), TestUtils.CreateCell("..b..")));
}
}
}
\ No newline at end of file
diff --git a/source/fitTest/NUnit/CellMaking.cs b/source/fitTest/NUnit/CellMaking.cs
index b007b284..f8281733 100644
--- a/source/fitTest/NUnit/CellMaking.cs
+++ b/source/fitTest/NUnit/CellMaking.cs
@@ -6,19 +6,20 @@
using fitlibrary.table;
using fitSharp.Machine.Engine;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture] public class CellMaking {
[Test] public void CellIsMadeWithSimpleString() {
var service = new Service.Service();
var cell = (Parse) service.Compose("something");
- Assert.AreEqual("something ", cell.ToString());
+ ClassicAssert.AreEqual("something ", cell.ToString());
}
[Test] public void CellIsMadeWithArray() {
var service = new Service.Service();
var cell = (Parse) service.Compose(new [] {"something", "else"});
- Assert.AreEqual("something, else ", cell.ToString());
+ ClassicAssert.AreEqual("something, else ", cell.ToString());
}
[Test] public void CellIsMadeWithEmbeddedTable() {
@@ -26,7 +27,7 @@ [Test] public void CellIsMadeWithEmbeddedTable() {
Parse table =
Parse.ParseFrom("");
var cell = (Parse) service.Compose(new ParseTable(table));
- Assert.AreEqual("\n\n\n11 12 " +
+ ClassicAssert.AreEqual("\n\n ", cell.ToString());
}
}
diff --git a/source/fitTest/NUnit/CellMatching.cs b/source/fitTest/NUnit/CellMatching.cs
index 8feea8be..aca43333 100644
--- a/source/fitTest/NUnit/CellMatching.cs
+++ b/source/fitTest/NUnit/CellMatching.cs
@@ -1,4 +1,4 @@
-// Copyright © 2012 Syterra Software Inc.
+// Copyright � 2012 Syterra Software Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -9,12 +9,13 @@
using fitSharp.Machine.Model;
using TestStatus=fitSharp.Fit.Model.TestStatus;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture] public class CellMatching {
[Test] public void NullEqualsNullCell() {
- Assert.IsTrue(IsEqual(new Parse("td", null, null, null), null));
+ ClassicAssert.IsTrue(IsEqual(new Parse("td", null, null, null), null));
}
private static bool IsEqual(Tree cell, object value) {
@@ -22,54 +23,54 @@ private static bool IsEqual(Tree cell, object value) {
}
[Test] public void NullEqualsEmptyCell() {
- Assert.IsTrue(IsEqual(new Parse("td", string.Empty, null, null), null));
+ ClassicAssert.IsTrue(IsEqual(new Parse("td", string.Empty, null, null), null));
}
[Test] public void NullDoesntEqualFullCell() {
- Assert.IsFalse(IsEqual(new Parse("td", "something", null, null), null));
+ ClassicAssert.IsFalse(IsEqual(new Parse("td", "something", null, null), null));
}
[Test] public void StringEqualsSameStringCell() {
- Assert.IsTrue(IsEqual(new Parse("td", "something", null, null), "something"));
+ ClassicAssert.IsTrue(IsEqual(new Parse("td", "something", null, null), "something"));
}
[Test] public void MarksSameStringCellAsRight() {
var cell = new Parse("td", "something", null, null);
var fixture = new Fixture {Processor = new Service.Service()};
fixture.Processor.Check(new TypedValue("something"), cell);
- Assert.AreEqual("\nsomething ", cell.ToString());
+ ClassicAssert.AreEqual("\nsomething ", cell.ToString());
}
[Test] public void MarksSameArrayCellAsRight() {
var cell = new Parse("td", "something,more", null, null);
var fixture = new Fixture {Processor = new Service.Service()};
fixture.Processor.Check(new TypedValue(new [] {"something", "more"}), cell);
- Assert.AreEqual("\nsomething,more ", cell.ToString());
+ ClassicAssert.AreEqual("\nsomething,more ", cell.ToString());
}
[Test] public void StringDoesntEqualDifferentStringCell() {
- Assert.IsFalse(IsEqual(new Parse("td", "something else", null, null), "something"));
+ ClassicAssert.IsFalse(IsEqual(new Parse("td", "something else", null, null), "something"));
}
[Test] public void MarksDifferentStringCellAsWrong() {
var cell = new Parse("td", "something else", null, null);
var fixture = new Fixture {Processor = new Service.Service()};
fixture.Processor.Check(new TypedValue("something"), cell);
- Assert.AreEqual(fitSharp.Fit.Model.TestStatus.Wrong, cell.GetAttribute(CellAttribute.Status));
- Assert.AreEqual("something", cell.GetAttribute(CellAttribute.Actual));
- Assert.IsTrue(cell.HasAttribute(CellAttribute.Difference));
+ ClassicAssert.AreEqual(fitSharp.Fit.Model.TestStatus.Wrong, cell.GetAttribute(CellAttribute.Status));
+ ClassicAssert.AreEqual("something", cell.GetAttribute(CellAttribute.Actual));
+ ClassicAssert.IsTrue(cell.HasAttribute(CellAttribute.Difference));
}
[Test] public void TreeEqualsSameTreeCell() {
object actual = new ListTree(string.Empty, new []{new ListTree("a")});
Parse table = Parse.ParseFrom("");
- Assert.IsTrue(IsEqual(table.Parts.Parts, actual));
+ ClassicAssert.IsTrue(IsEqual(table.Parts.Parts, actual));
}
[Test] public void ListEqualsSameTableCell() {
var actual = new ArrayList {new Name("joe", "smith")};
Parse table = Parse.ParseFrom("");
- Assert.IsTrue(IsEqual(table.Parts.Parts, actual));
+ ClassicAssert.IsTrue(IsEqual(table.Parts.Parts, actual));
}
[Test] public void MarksSameTableCellAsRight() {
@@ -78,8 +79,8 @@ [Test] public void MarksSameTableCellAsRight() {
var fixture = new Fixture {Processor = new Service.Service()};
fixture.Processor.Check(new TypedValue(actual), table.Parts.Parts);
var passRow = table.Parts.Parts.Parts.Parts.More;
- Assert.AreEqual(TestStatus.Right, passRow.Parts.Value.GetAttribute(CellAttribute.Status));
- Assert.AreEqual(TestStatus.Right, passRow.Parts.More.Value.GetAttribute(CellAttribute.Status));
+ ClassicAssert.AreEqual(TestStatus.Right, passRow.Parts.Value.GetAttribute(CellAttribute.Status));
+ ClassicAssert.AreEqual(TestStatus.Right, passRow.Parts.More.Value.GetAttribute(CellAttribute.Status));
}
[Test] public void MarksExtraTableHeaderAsError() {
@@ -88,7 +89,7 @@ [Test] public void MarksExtraTableHeaderAsError() {
var fixture = new Fixture {Processor = new Service.Service()};
fixture.Processor.Check(new TypedValue(actual), table.Parts.Parts);
var errorCell = table.Parts.Parts.Parts.Parts.Parts.More.More.Value;
- Assert.IsTrue(errorCell.HasAttribute(CellAttribute.Exception));
+ ClassicAssert.IsTrue(errorCell.HasAttribute(CellAttribute.Exception));
}
private class Name {
diff --git a/source/fitTest/NUnit/CellOperatorTest.cs b/source/fitTest/NUnit/CellOperatorTest.cs
index a710d88f..9db118ec 100644
--- a/source/fitTest/NUnit/CellOperatorTest.cs
+++ b/source/fitTest/NUnit/CellOperatorTest.cs
@@ -13,6 +13,7 @@
using fitSharp.Machine.Model;
using fitSharp.Samples.Fit;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
using TestStatus=fitSharp.Fit.Model.TestStatus;
namespace fit.Test.NUnit {
@@ -63,17 +64,17 @@ public void MakeIntFixture() {
public static void AssertCellPasses(Parse cell)
{
- Assert.AreEqual(TestStatus.Right, cell.GetAttribute(CellAttribute.Status));
+ ClassicAssert.AreEqual(TestStatus.Right, cell.GetAttribute(CellAttribute.Status));
}
public static void AssertCellFails(Parse cell)
{
- Assert.AreEqual(TestStatus.Wrong, cell.GetAttribute(CellAttribute.Status));
+ ClassicAssert.AreEqual(TestStatus.Wrong, cell.GetAttribute(CellAttribute.Status));
}
public static void AssertValueInBody(Parse cell, string value)
{
- Assert.IsTrue(cell.Body.IndexOf(value) > -1);
+ ClassicAssert.IsTrue(cell.Body.IndexOf(value) > -1);
}
public static void AssertValuesInBody(Parse cell, string[] values)
diff --git a/source/fitTest/NUnit/ColumnFixtureTests.cs b/source/fitTest/NUnit/ColumnFixtureTests.cs
index 4c549d77..07289dbd 100644
--- a/source/fitTest/NUnit/ColumnFixtureTests.cs
+++ b/source/fitTest/NUnit/ColumnFixtureTests.cs
@@ -1,4 +1,4 @@
-// Copyright © 2010 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2010 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -6,6 +6,7 @@
using System.Collections;
using fitSharp.Fit.Model;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture]
@@ -66,10 +67,10 @@ public void TestExecuteAtEnd()
var table = builder.Parse.Parts;
var testFixture = new ExecuteTestFixture { Processor = new Service.Service()};
testFixture.DoTable(table);
- Assert.AreEqual(3, testFixture.Values.Count);
- Assert.AreEqual("first call", testFixture.Values[0]);
- Assert.AreEqual("second call", testFixture.Values[1]);
- Assert.AreEqual("Execute()", testFixture.Values[2]);
+ ClassicAssert.AreEqual(3, testFixture.Values.Count);
+ ClassicAssert.AreEqual("first call", testFixture.Values[0]);
+ ClassicAssert.AreEqual("second call", testFixture.Values[1]);
+ ClassicAssert.AreEqual("Execute()", testFixture.Values[2]);
}
[Test]
@@ -85,10 +86,10 @@ public void TestExecuteInMiddle()
var table = builder.Parse.Parts;
var testFixture = new ExecuteTestFixture { Processor = new Service.Service()};
testFixture.DoTable(table);
- Assert.AreEqual(3, testFixture.Values.Count);
- Assert.AreEqual("first call", testFixture.Values[0]);
- Assert.AreEqual("Execute()", testFixture.Values[1]);
- Assert.AreEqual("second call", testFixture.Values[2]);
+ ClassicAssert.AreEqual(3, testFixture.Values.Count);
+ ClassicAssert.AreEqual("first call", testFixture.Values[0]);
+ ClassicAssert.AreEqual("Execute()", testFixture.Values[1]);
+ ClassicAssert.AreEqual("second call", testFixture.Values[2]);
}
[Test]
@@ -104,16 +105,16 @@ public void TestExecuteWithMethod()
var table = builder.Parse.Parts;
var testFixture = new ExecuteTestFixture { Processor = new Service.Service()};
testFixture.DoTable(table);
- Assert.AreEqual(3, testFixture.Values.Count);
- Assert.AreEqual("first call", testFixture.Values[0]);
- Assert.AreEqual("Execute()", testFixture.Values[1]);
- Assert.AreEqual("method!", testFixture.Values[2]);
+ ClassicAssert.AreEqual(3, testFixture.Values.Count);
+ ClassicAssert.AreEqual("first call", testFixture.Values[0]);
+ ClassicAssert.AreEqual("Execute()", testFixture.Values[1]);
+ ClassicAssert.AreEqual("method!", testFixture.Values[2]);
}
[Test]
public void TestGetTargetObject() {
Fixture fixture = new ExecuteTestFixture();
- Assert.AreEqual(fixture, fixture.GetTargetObject());
+ ClassicAssert.AreEqual(fixture, fixture.GetTargetObject());
}
[Test]
@@ -145,11 +146,11 @@ public void TestExecuteDoesNotCauseMethodsToGetCalledThrice()
var table = builder.Parse.Parts;
var testFixture = new ExecuteTestFixture { Processor = new Service.Service()};
testFixture.DoTable(table);
- Assert.AreEqual(4, testFixture.Values.Count);
- Assert.AreEqual("Execute()", testFixture.Values[0]);
- Assert.AreEqual("Method()", testFixture.Values[1]);
- Assert.AreEqual("Execute()", testFixture.Values[2]);
- Assert.AreEqual("Method()", testFixture.Values[3]);
+ ClassicAssert.AreEqual(4, testFixture.Values.Count);
+ ClassicAssert.AreEqual("Execute()", testFixture.Values[0]);
+ ClassicAssert.AreEqual("Method()", testFixture.Values[1]);
+ ClassicAssert.AreEqual("Execute()", testFixture.Values[2]);
+ ClassicAssert.AreEqual("Method()", testFixture.Values[3]);
TestUtils.VerifyCounts(testFixture, 2, 0, 0, 0);
}
diff --git a/source/fitTest/NUnit/ComposeStoryTestHtmlTest.cs b/source/fitTest/NUnit/ComposeStoryTestHtmlTest.cs
index 085e9a7b..c08484d7 100644
--- a/source/fitTest/NUnit/ComposeStoryTestHtmlTest.cs
+++ b/source/fitTest/NUnit/ComposeStoryTestHtmlTest.cs
@@ -7,6 +7,7 @@
using fitSharp.Machine.Engine;
using fitSharp.Machine.Model;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture] public class ComposeStoryTestHtmlTest {
@@ -15,16 +16,16 @@ [Test] public void HtmlStringIsParsed() {
var service = new Service.Service();
var result = service.Compose(StoryTestSource.FromString(""));
var table = ((Parse)result).Parts;
- Assert.AreEqual("", table.Tag);
+ ClassicAssert.AreEqual("", table.Tag);
var cell = table.Parts.Parts;
- Assert.AreEqual("", cell.Tag);
- Assert.AreEqual("hello", cell.Body);
+ ClassicAssert.AreEqual(" ", cell.Tag);
+ ClassicAssert.AreEqual("hello", cell.Body);
}
[Test] public void NoTablesReturnsEmptyTree() {
var service = new Service.Service();
var result = service.Compose(StoryTestSource.FromString("stuff "));
- Assert.AreEqual(0, result.Branches.Count);
+ ClassicAssert.AreEqual(0, result.Branches.Count);
}
[Test] public void SimpleHtmlStringIsGenerated() {
@@ -43,7 +44,7 @@ static void CheckRoundTrip(string input) {
var service = new Service.Service();
var source = service.Compose(StoryTestSource.FromString(input));
var result = source.WriteBranches();
- Assert.AreEqual(input, result);
+ ClassicAssert.AreEqual(input, result);
}
}
}
diff --git a/source/fitTest/NUnit/DefaultCellHandlerTest.cs b/source/fitTest/NUnit/DefaultCellHandlerTest.cs
index df3fffa3..8faee41d 100644
--- a/source/fitTest/NUnit/DefaultCellHandlerTest.cs
+++ b/source/fitTest/NUnit/DefaultCellHandlerTest.cs
@@ -1,4 +1,4 @@
-// Copyright © 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -8,6 +8,7 @@
using fitSharp.Fit.Model;
using fitSharp.Machine.Model;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
using TestStatus=fitSharp.Fit.Model.TestStatus;
namespace fit.Test.NUnit {
@@ -21,7 +22,7 @@ public void TestDoInput()
Parse cell = TestUtils.CreateCell("xyz");
MakeStringFixture();
TestUtils.DoInput(stringFixture, TestUtils.CreateCellRange("Field"), cell);
- Assert.AreEqual("xyz", stringFixture.Field);
+ ClassicAssert.AreEqual("xyz", stringFixture.Field);
TestUtils.VerifyCounts(stringFixture, 0, 0, 0, 0);
}
@@ -43,8 +44,8 @@ public void TestDoCheckCellWrong() {
stringFixture.Field = "abc";
TestUtils.DoCheck(stringFixture, TestUtils.CreateCellRange("Field"), cell);
AssertCellFails(cell);
- Assert.IsTrue(cell.Body.IndexOf("abc") > -1);
- Assert.IsTrue(cell.Body.IndexOf("xyz") > -1);
+ ClassicAssert.IsTrue(cell.Body.IndexOf("abc") > -1);
+ ClassicAssert.IsTrue(cell.Body.IndexOf("xyz") > -1);
TestUtils.VerifyCounts(stringFixture, 0, 1, 0, 0);
}
@@ -55,8 +56,8 @@ public void TestDoCheckCellWrongNull() {
stringFixture.Field = null;
TestUtils.DoCheck(stringFixture, TestUtils.CreateCellRange("Field"), cell);
AssertCellFails(cell);
- Assert.IsTrue(cell.Body.IndexOf("null") > -1);
- Assert.IsTrue(cell.Body.IndexOf("xyz") > -1);
+ ClassicAssert.IsTrue(cell.Body.IndexOf("null") > -1);
+ ClassicAssert.IsTrue(cell.Body.IndexOf("xyz") > -1);
TestUtils.VerifyCounts(stringFixture, 0, 1, 0, 0);
}
@@ -69,7 +70,7 @@ public void TestInvoke()
service = new Service.Service();
var fixture = new FixtureWithExecutableMethod {Processor = service};
fixture.Processor.Execute(fixture, new CellRange(cell, 1), new CellTree());
- Assert.AreEqual(1, FixtureWithExecutableMethod.Calls);
+ ClassicAssert.AreEqual(1, FixtureWithExecutableMethod.Calls);
}
[Test]
@@ -77,10 +78,10 @@ public void TestEvaluateWrong() {
Parse cell = TestUtils.CreateCell("xyz");
MakeStringFixture();
stringFixture.Field = "abc";
- Assert.IsFalse(service.Compare(new TypedValue("abc"), cell));
- Assert.AreNotEqual(TestStatus.Wrong, cell.GetAttribute(CellAttribute.Status));
- Assert.IsFalse(cell.Body.IndexOf("abc") > -1);
- Assert.IsTrue(cell.Body.IndexOf("xyz") > -1);
+ ClassicAssert.IsFalse(service.Compare(new TypedValue("abc"), cell));
+ ClassicAssert.AreNotEqual(TestStatus.Wrong, cell.GetAttribute(CellAttribute.Status));
+ ClassicAssert.IsFalse(cell.Body.IndexOf("abc") > -1);
+ ClassicAssert.IsTrue(cell.Body.IndexOf("xyz") > -1);
TestUtils.VerifyCounts(stringFixture, 0, 0, 0, 0);
}
@@ -90,8 +91,8 @@ public void TestEvaluateRight() {
Parse cell = TestUtils.CreateCell("xyz");
MakeStringFixture();
stringFixture.Field = "xyz";
- Assert.IsTrue(service.Compare(new TypedValue("xyz"), cell));
- Assert.AreNotEqual(TestStatus.Right, cell.GetAttribute(CellAttribute.Status));
+ ClassicAssert.IsTrue(service.Compare(new TypedValue("xyz"), cell));
+ ClassicAssert.AreNotEqual(TestStatus.Right, cell.GetAttribute(CellAttribute.Status));
TestUtils.VerifyCounts(stringFixture, 0, 0, 0, 0);
}
diff --git a/source/fitTest/NUnit/EmptyCellHandlerTest.cs b/source/fitTest/NUnit/EmptyCellHandlerTest.cs
index 828d3942..2d993b2b 100644
--- a/source/fitTest/NUnit/EmptyCellHandlerTest.cs
+++ b/source/fitTest/NUnit/EmptyCellHandlerTest.cs
@@ -1,10 +1,11 @@
-// Copyright © 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
using fitSharp.Fit.Operators;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture]
@@ -19,14 +20,14 @@ public void SetUp() {
[Test]
public void TestMatch() {
- Assert.IsTrue(IsMatch(new CheckEmpty(), ""));
+ ClassicAssert.IsTrue(IsMatch(new CheckEmpty(), ""));
}
[Test]
public void TestInputWhereNullValueExists() {
MakeStringFixture();
TestUtils.DoInput(stringFixture, TestUtils.CreateCellRange("Field"), cell);
- Assert.AreEqual(null, stringFixture.Field);
+ ClassicAssert.AreEqual(null, stringFixture.Field);
AssertValuesInBody(cell, new [] {"fit_grey", "null"});
TestUtils.VerifyCounts(stringFixture, 0, 0, 0, 0);
}
@@ -36,7 +37,7 @@ public void TestInputWhereBlankValueExists() {
MakeStringFixture();
stringFixture.Field = "";
TestUtils.DoInput(stringFixture, TestUtils.CreateCellRange("Field"), cell);
- Assert.AreEqual("", stringFixture.Field);
+ ClassicAssert.AreEqual("", stringFixture.Field);
AssertValuesInBody(cell, new [] {"fit_grey", "blank"});
TestUtils.VerifyCounts(stringFixture, 0, 0, 0, 0);
}
@@ -46,7 +47,7 @@ public void TestInputWhereValueExists() {
MakeIntFixture();
intFixture.Field = 37;
TestUtils.DoInput(intFixture, TestUtils.CreateCellRange("Field"), cell);
- Assert.AreEqual(37, intFixture.Field);
+ ClassicAssert.AreEqual(37, intFixture.Field);
AssertValuesInBody(cell, new [] {"fit_grey", "37"});
TestUtils.VerifyCounts(intFixture, 0, 0, 0, 0);
}
@@ -55,7 +56,7 @@ public void TestInputWhereValueExists() {
public void TestInputNullValueWithMethod() {
MakeStringFixture();
TestUtils.DoInput(stringFixture, TestUtils.CreateCellRange("Set"), cell);
- Assert.AreEqual(null, stringFixture.Field);
+ ClassicAssert.AreEqual(null, stringFixture.Field);
TestUtils.VerifyCounts(stringFixture, 0, 0, 0, 0);
}
diff --git a/source/fitTest/NUnit/EndsWithHandlerTest.cs b/source/fitTest/NUnit/EndsWithHandlerTest.cs
index 252e07a3..b5d1d591 100644
--- a/source/fitTest/NUnit/EndsWithHandlerTest.cs
+++ b/source/fitTest/NUnit/EndsWithHandlerTest.cs
@@ -1,4 +1,4 @@
-// Copyright © 2009 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2009 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -6,6 +6,7 @@
using fitSharp.Fit.Operators;
using fitSharp.Machine.Application;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture]
@@ -22,9 +23,9 @@ public void SetUp()
[Test]
public void MatchesInput()
{
- Assert.IsFalse(IsMatch("abc.."));
- Assert.IsTrue(IsMatch("..abc"));
- Assert.IsFalse(IsMatch("..abc.."));
+ ClassicAssert.IsFalse(IsMatch("abc.."));
+ ClassicAssert.IsTrue(IsMatch("..abc"));
+ ClassicAssert.IsFalse(IsMatch("..abc.."));
}
private static bool IsMatch(string input) {
diff --git a/source/fitTest/NUnit/ErrorKeywordHandlerTest.cs b/source/fitTest/NUnit/ErrorKeywordHandlerTest.cs
index 3252a2c5..25659131 100644
--- a/source/fitTest/NUnit/ErrorKeywordHandlerTest.cs
+++ b/source/fitTest/NUnit/ErrorKeywordHandlerTest.cs
@@ -1,10 +1,11 @@
-// Copyright © 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
using fitSharp.Fit.Operators;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture]
@@ -15,7 +16,7 @@ public class ErrorKeywordHandlerTest: CellOperatorTest
[Test]
public void MatchesErrorKeyword()
{
- Assert.IsTrue(IsMatch(new CompareError(), "error"));
+ ClassicAssert.IsTrue(IsMatch(new CompareError(), "error"));
}
[Test]
@@ -25,7 +26,7 @@ public void TestDoCheckErrorRight()
MakeErrorFixture();
TestUtils.DoCheck(fixture, TestUtils.CreateCellRange("ErrorThrowingMethod"), cell);
AssertCellPasses(cell);
- Assert.IsTrue(cell.Body.IndexOf("error") > -1);
+ ClassicAssert.IsTrue(cell.Body.IndexOf("error") > -1);
TestUtils.VerifyCounts(fixture, 1, 0, 0, 0);
}
@@ -37,8 +38,8 @@ public void TestDoCheckErrorWrong()
stringFixture.Field = "some value";
TestUtils.DoCheck(stringFixture, TestUtils.CreateCellRange("field"), cell);
AssertCellFails(cell);
- Assert.IsTrue(cell.Body.IndexOf("error") > -1);
- Assert.IsTrue(cell.Body.IndexOf("some value") > -1);
+ ClassicAssert.IsTrue(cell.Body.IndexOf("error") > -1);
+ ClassicAssert.IsTrue(cell.Body.IndexOf("some value") > -1);
TestUtils.VerifyCounts(stringFixture, 0, 1, 0, 0);
}
diff --git a/source/fitTest/NUnit/ExceptionKeywordHandlerTest.cs b/source/fitTest/NUnit/ExceptionKeywordHandlerTest.cs
index 0ea399fe..7e11cf30 100644
--- a/source/fitTest/NUnit/ExceptionKeywordHandlerTest.cs
+++ b/source/fitTest/NUnit/ExceptionKeywordHandlerTest.cs
@@ -1,10 +1,11 @@
-// Copyright © 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
using fitSharp.Fit.Operators;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture]
@@ -15,8 +16,8 @@ public class ExceptionKeywordHandlerTest: CellOperatorTest
[Test]
public void TestMatch()
{
- Assert.IsTrue(IsMatch(new CompareException(), "exception[]"));
- Assert.IsTrue(IsMatch(new CompareException(), "exception[NullPointerException]"));
+ ClassicAssert.IsTrue(IsMatch(new CompareException(), "exception[]"));
+ ClassicAssert.IsTrue(IsMatch(new CompareException(), "exception[NullPointerException]"));
}
diff --git a/source/fitTest/NUnit/FailKeywordHandlerTest.cs b/source/fitTest/NUnit/FailKeywordHandlerTest.cs
index e3a5304f..01340231 100644
--- a/source/fitTest/NUnit/FailKeywordHandlerTest.cs
+++ b/source/fitTest/NUnit/FailKeywordHandlerTest.cs
@@ -1,4 +1,4 @@
-// Copyright © 2009 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2009 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -6,6 +6,7 @@
using fitSharp.Fit.Operators;
using fitSharp.Samples;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture]
@@ -14,8 +15,8 @@ public class FailKeywordHandlerTest: CellOperatorTest
[Test]
public void TestMatch()
{
- Assert.IsTrue(IsMatch("fail[]"));
- Assert.IsTrue(IsMatch("fail[some value]"));
+ ClassicAssert.IsTrue(IsMatch("fail[]"));
+ ClassicAssert.IsTrue(IsMatch("fail[some value]"));
}
private static bool IsMatch(string input) {
diff --git a/source/fitTest/NUnit/FixtureNUnitTest.cs b/source/fitTest/NUnit/FixtureNUnitTest.cs
index d6aa8e45..86488087 100644
--- a/source/fitTest/NUnit/FixtureNUnitTest.cs
+++ b/source/fitTest/NUnit/FixtureNUnitTest.cs
@@ -1,4 +1,4 @@
-// Copyright © 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -10,6 +10,7 @@
using fitSharp.Samples.Fit;
using NUnit.Framework;
using fitSharp.Machine.Application;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture]
@@ -21,7 +22,7 @@ public void NoParameterCellsShouldResultInNoArguments()
const string tableString = "";
Fixture stringFixture = new StringFixture();
stringFixture.Prepare(null, Parse.ParseFrom(tableString).Parts);
- Assert.AreEqual(0, stringFixture.Args.Length);
+ ClassicAssert.AreEqual(0, stringFixture.Args.Length);
}
[Test]
@@ -31,8 +32,8 @@ public void OneParameterCellShouldResultInOneArgument()
const string tableString = "StringFixture " + arg + " field field ";
Fixture stringFixture = new StringFixture();
stringFixture.Prepare(null, Parse.ParseFrom(tableString).Parts);
- Assert.AreEqual(1, stringFixture.Args.Length);
- Assert.AreEqual(arg, stringFixture.Args[0]);
+ ClassicAssert.AreEqual(1, stringFixture.Args.Length);
+ ClassicAssert.AreEqual(arg, stringFixture.Args[0]);
}
[Test]
@@ -43,9 +44,9 @@ public void TwoParameterCellShouldResultInTwoArguments()
const string tableString = "StringFixture " + arg1 + " " + arg2 + " field field ";
Fixture stringFixture = new StringFixture();
stringFixture.Prepare(null, Parse.ParseFrom(tableString).Parts);
- Assert.AreEqual(2, stringFixture.Args.Length);
- Assert.AreEqual(arg1, stringFixture.Args[0]);
- Assert.AreEqual(arg2, stringFixture.Args[1]);
+ ClassicAssert.AreEqual(2, stringFixture.Args.Length);
+ ClassicAssert.AreEqual(arg1, stringFixture.Args[0]);
+ ClassicAssert.AreEqual(arg2, stringFixture.Args[1]);
}
}
@@ -56,15 +57,15 @@ public class EscapeTest
public void TestEscape()
{
const string junk = "!@#$%^*()_-+={}|[]\\:\";',./?`";
- Assert.AreEqual(junk, Fixture.Escape(junk));
- Assert.AreEqual("", Fixture.Escape(""));
- Assert.AreEqual("<", Fixture.Escape("<"));
- Assert.AreEqual("<<", Fixture.Escape("<<"));
- Assert.AreEqual("x<", Fixture.Escape("x<"));
- Assert.AreEqual("&", Fixture.Escape("&"));
- Assert.AreEqual("<&<", Fixture.Escape("<&<"));
- Assert.AreEqual("&<&", Fixture.Escape("&<&"));
- Assert.AreEqual("a < b && c < d", Fixture.Escape("a < b && c < d"));
+ ClassicAssert.AreEqual(junk, Fixture.Escape(junk));
+ ClassicAssert.AreEqual("", Fixture.Escape(""));
+ ClassicAssert.AreEqual("<", Fixture.Escape("<"));
+ ClassicAssert.AreEqual("<<", Fixture.Escape("<<"));
+ ClassicAssert.AreEqual("x<", Fixture.Escape("x<"));
+ ClassicAssert.AreEqual("&", Fixture.Escape("&"));
+ ClassicAssert.AreEqual("<&<", Fixture.Escape("<&<"));
+ ClassicAssert.AreEqual("&<&", Fixture.Escape("&<&"));
+ ClassicAssert.AreEqual("a < b && c < d", Fixture.Escape("a < b && c < d"));
}
}
@@ -86,7 +87,7 @@ public void TestProcessorContextDataIsExposedToFixture() {
// I admit this test is a little forced, but I have another test verifying that
// the context is populated by SuiteRunner, so it makes sense to test
// that the fixture sees the change, too. To me, anyway.
- Assert.AreEqual(@"\some\path.html", fixture.Processor.Get().TestPagePath.ToString());
+ ClassicAssert.AreEqual(@"\some\path.html", fixture.Processor.Get().TestPagePath.ToString());
}
}
@@ -108,9 +109,9 @@ public void TestSaveAndRecallValue()
{
const string key = "aVariable";
const string value = "aValue";
- Assert.IsNull(fixture.Symbols.GetValueOrDefault(key, null));
+ ClassicAssert.IsNull(fixture.Symbols.GetValueOrDefault(key, null));
fixture.Symbols.Save(key, value);
- Assert.AreEqual(value, fixture.Symbols.GetValueOrDefault(key, null));
+ ClassicAssert.AreEqual(value, fixture.Symbols.GetValueOrDefault(key, null));
}
[Test]
@@ -120,11 +121,11 @@ public void TestSaveAndRecallTwoValues()
const string value = "aValue";
const string otherKey = "anotherVariable";
const string otherValue = "anotherValue";
- Assert.IsNull(fixture.Symbols.GetValueOrDefault(key, null));
+ ClassicAssert.IsNull(fixture.Symbols.GetValueOrDefault(key, null));
fixture.Symbols.Save(key, value);
fixture.Symbols.Save(otherKey, otherValue);
- Assert.AreEqual(value, fixture.Symbols.GetValueOrDefault(key, null));
- Assert.AreEqual(otherValue, fixture.Symbols.GetValueOrDefault(otherKey, null));
+ ClassicAssert.AreEqual(value, fixture.Symbols.GetValueOrDefault(key, null));
+ ClassicAssert.AreEqual(otherValue, fixture.Symbols.GetValueOrDefault(otherKey, null));
}
[Test]
@@ -135,13 +136,13 @@ public void TestSaveAndRecallChangedValue()
const string otherValue = "anotherValue";
fixture.Symbols.Save(key, value);
fixture.Symbols.Save(key, otherValue);
- Assert.AreEqual(otherValue, fixture.Symbols.GetValueOrDefault(key, null));
+ ClassicAssert.AreEqual(otherValue, fixture.Symbols.GetValueOrDefault(key, null));
}
[Test]
public void TestGetTargetType()
{
- Assert.AreSame(fixture, fixture.GetTargetObject());
+ ClassicAssert.AreSame(fixture, fixture.GetTargetObject());
}
}
diff --git a/source/fitTest/NUnit/FixtureTableTest.cs b/source/fitTest/NUnit/FixtureTableTest.cs
index b5910218..09b24678 100644
--- a/source/fitTest/NUnit/FixtureTableTest.cs
+++ b/source/fitTest/NUnit/FixtureTableTest.cs
@@ -1,10 +1,11 @@
-// Copyright © 2009 Syterra Software Inc.
+// Copyright � 2009 Syterra Software Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
using fit.Operators;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture] public class FixtureTableTest {
@@ -12,13 +13,13 @@ [TestFixture] public class FixtureTableTest {
[Test] public void EmptyTablesMatch() {
var table1 = new FixtureTable(null);
var table2 = new FixtureTable(null);
- Assert.AreEqual(string.Empty, table1.Differences(table2));
+ ClassicAssert.AreEqual(string.Empty, table1.Differences(table2));
}
[Test] public void EmptyAndNonEmptyDifferent() {
var table1 = new FixtureTable(Parse.ParseFrom(""));
var table2 = new FixtureTable(null);
- Assert.AreEqual("expected: null, was ''", table1.Differences(table2));
+ ClassicAssert.AreEqual("expected: null, was ''", table1.Differences(table2));
}
[Test] public void TableCellsDifferent() {
@@ -28,7 +29,7 @@ [Test] public void TableCellsDifferent() {
var table2 = new FixtureTable(Parse.ParseFrom(
""));
- Assert.AreEqual("in , in , in body, expected: 'expected', was 'actual'", table1.Differences(table2));
+ ClassicAssert.AreEqual("in , in , in body, expected: 'expected', was 'actual'", table1.Differences(table2));
}
[Test] public void TableCellTagsDifferent() {
@@ -38,7 +39,7 @@ [Test] public void TableCellTagsDifferent() {
var table2 = new FixtureTable(Parse.ParseFrom(
""));
- Assert.AreEqual("in , in , expected: '', was ' '", table1.Differences(table2));
+ ClassicAssert.AreEqual("in , in , expected: '', was ' '", table1.Differences(table2));
}
[Test] public void EmptyTableCellsMatch() {
@@ -48,7 +49,7 @@ [Test] public void EmptyTableCellsMatch() {
var table2 = new FixtureTable(Parse.ParseFrom(
""));
- Assert.AreEqual(string.Empty, table1.Differences(table2));
+ ClassicAssert.AreEqual(string.Empty, table1.Differences(table2));
}
[Test] public void StackTraceStartsWithExpectedMatches() {
@@ -58,7 +59,7 @@ [Test] public void StackTraceStartsWithExpectedMatches() {
var table2 = new FixtureTable(Parse.ParseFrom(
">"));
- Assert.AreEqual(string.Empty, table1.Differences(table2));
+ ClassicAssert.AreEqual(string.Empty, table1.Differences(table2));
}
[Test] public void StackTraceWithoutExceptionNameMatches() {
@@ -68,7 +69,7 @@ [Test] public void StackTraceWithoutExceptionNameMatches() {
var table2 = new FixtureTable(Parse.ParseFrom(
">"));
- Assert.AreEqual(string.Empty, table1.Differences(table2));
+ ClassicAssert.AreEqual(string.Empty, table1.Differences(table2));
}
[Test] public void StackTraceEmptyExpectedMatches() {
@@ -78,7 +79,7 @@ [Test] public void StackTraceEmptyExpectedMatches() {
var table2 = new FixtureTable(Parse.ParseFrom(
">"));
- Assert.AreEqual(string.Empty, table1.Differences(table2));
+ ClassicAssert.AreEqual(string.Empty, table1.Differences(table2));
}
[Test] public void StackTraceNoneExpectedDifferent() {
@@ -88,7 +89,7 @@ [Test] public void StackTraceNoneExpectedDifferent() {
var table2 = new FixtureTable(Parse.ParseFrom(
">"));
- Assert.AreEqual("in , in , in body, expected: null, was 'stack trace blah blah'", table1.Differences(table2));
+ ClassicAssert.AreEqual("in , in , in body, expected: null, was 'stack trace blah blah'", table1.Differences(table2));
}
}
diff --git a/source/fitTest/NUnit/FolderRunnerTest.cs b/source/fitTest/NUnit/FolderRunnerTest.cs
index 24afc283..54b652c1 100644
--- a/source/fitTest/NUnit/FolderRunnerTest.cs
+++ b/source/fitTest/NUnit/FolderRunnerTest.cs
@@ -8,6 +8,7 @@
using fitSharp.Machine.Application;
using fit.Runner;
using fitSharp.IO;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture] public class FolderRunnerTest {
@@ -24,9 +25,9 @@ [Test] public void ParsingOfDryRunInputAndOutputFolderIsDoneCorrectly() {
var runner = new FolderRunner();
runner.Run(new[] { "-d", "-i", "overridden_in", "-o", "overridden_out" }, memory, new NullReporter());
- Assert.AreEqual(true, memory.GetItem().DryRun);
- Assert.AreEqual("overridden_in", memory.GetItem().InputFolder);
- Assert.AreEqual("overridden_out", memory.GetItem().OutputFolder);
+ ClassicAssert.AreEqual(true, memory.GetItem().DryRun);
+ ClassicAssert.AreEqual("overridden_in", memory.GetItem().InputFolder);
+ ClassicAssert.AreEqual("overridden_out", memory.GetItem().OutputFolder);
}
[Test] public void DryRunSuppressesSummaryReport() {
@@ -37,7 +38,7 @@ [Test] public void DryRunSuppressesSummaryReport() {
var runner = new FolderRunner();
runner.Run(new string[] {}, memory, reporter);
- Assert.AreEqual(string.Empty, reporter.Output);
+ ClassicAssert.AreEqual(string.Empty, reporter.Output);
}
}
}
diff --git a/source/fitTest/NUnit/IntegralRangeHandlerTest.cs b/source/fitTest/NUnit/IntegralRangeHandlerTest.cs
index ca9650a3..d81a8201 100644
--- a/source/fitTest/NUnit/IntegralRangeHandlerTest.cs
+++ b/source/fitTest/NUnit/IntegralRangeHandlerTest.cs
@@ -1,10 +1,11 @@
-// Copyright © 2009 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2009 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
using fitSharp.Fit.Operators;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture]
@@ -19,13 +20,13 @@ public void SetUp() {
[Test]
public void MatchesInput() {
- Assert.IsTrue(IsMatch("0..2"));
- Assert.IsFalse(IsMatch("..2"));
- Assert.IsFalse(IsMatch(".."));
- Assert.IsTrue(IsMatch("-10..-2"));
- Assert.IsTrue(IsMatch("-10..23"));
- Assert.IsTrue(IsMatch("12..37"));
- Assert.IsFalse(IsMatch("a..b"));
+ ClassicAssert.IsTrue(IsMatch("0..2"));
+ ClassicAssert.IsFalse(IsMatch("..2"));
+ ClassicAssert.IsFalse(IsMatch(".."));
+ ClassicAssert.IsTrue(IsMatch("-10..-2"));
+ ClassicAssert.IsTrue(IsMatch("-10..23"));
+ ClassicAssert.IsTrue(IsMatch("12..37"));
+ ClassicAssert.IsFalse(IsMatch("a..b"));
}
private static bool IsMatch(string input) {
diff --git a/source/fitTest/NUnit/NamedMatchStrategyTest.cs b/source/fitTest/NUnit/NamedMatchStrategyTest.cs
index 65d07bbb..4b4dc71a 100644
--- a/source/fitTest/NUnit/NamedMatchStrategyTest.cs
+++ b/source/fitTest/NUnit/NamedMatchStrategyTest.cs
@@ -7,6 +7,7 @@
using fit.Operators;
using fitSharp.Machine.Model;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture] public class NamedMatchStrategyTest {
@@ -31,9 +32,9 @@ private static void AssertGetsActuals(string columnName, string headerName) {
var strategy = new TestStrategy(new Parse("tr", string.Empty,
new Parse("td", headerName, null, null), null));
TypedValue[] values = strategy.ActualValues(row);
- Assert.AreEqual(1, values.Length);
- Assert.AreEqual(typeof(string), values[0].Type);
- Assert.AreEqual("hi", values[0].Value);
+ ClassicAssert.AreEqual(1, values.Length);
+ ClassicAssert.AreEqual(typeof(string), values[0].Type);
+ ClassicAssert.AreEqual("hi", values[0].Value);
}
class TestStrategy: NamedMatchStrategy {
diff --git a/source/fitTest/NUnit/NullKeywordHandlerTest.cs b/source/fitTest/NUnit/NullKeywordHandlerTest.cs
index db2ad05a..43ed9d9c 100644
--- a/source/fitTest/NUnit/NullKeywordHandlerTest.cs
+++ b/source/fitTest/NUnit/NullKeywordHandlerTest.cs
@@ -1,10 +1,11 @@
-// Copyright © 2009 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2009 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
using fitSharp.Fit.Operators;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture]
@@ -12,7 +13,7 @@ public class NullKeywordHandlerTest: CellOperatorTest
{
[Test]
public void MatchesNullString() {
- Assert.IsTrue(IsMatch(new ParseNull(), "null"));
+ ClassicAssert.IsTrue(IsMatch(new ParseNull(), "null"));
}
[Test]
@@ -21,7 +22,7 @@ public void TestDoInputNull()
Parse cell = TestUtils.CreateCell("null");
MakeStringFixture();
TestUtils.DoInput(stringFixture, TestUtils.CreateCellRange("Field"), cell);
- Assert.AreEqual(null, stringFixture.Field);
+ ClassicAssert.AreEqual(null, stringFixture.Field);
TestUtils.VerifyCounts(stringFixture, 0, 0, 0, 0);
}
@@ -32,9 +33,9 @@ public void TestDoCheckNullRight()
MakeStringFixture();
stringFixture.Field = null;
TestUtils.DoCheck(stringFixture, TestUtils.CreateCellRange("field"), cell);
- Assert.AreEqual(null, stringFixture.Field);
+ ClassicAssert.AreEqual(null, stringFixture.Field);
AssertCellPasses(cell);
- Assert.IsTrue(cell.Body.IndexOf("null") > -1);
+ ClassicAssert.IsTrue(cell.Body.IndexOf("null") > -1);
TestUtils.VerifyCounts(stringFixture, 1, 0, 0, 0);
}
@@ -45,10 +46,10 @@ public void TestDoCheckNullWrong()
MakeStringFixture();
stringFixture.Field = "some value";
TestUtils.DoCheck(stringFixture, TestUtils.CreateCellRange("field"), cell);
- Assert.AreEqual("some value", stringFixture.Field);
+ ClassicAssert.AreEqual("some value", stringFixture.Field);
AssertCellFails(cell);
- Assert.IsTrue(cell.Body.IndexOf("null") > -1);
- Assert.IsTrue(cell.Body.IndexOf("some value") > -1);
+ ClassicAssert.IsTrue(cell.Body.IndexOf("null") > -1);
+ ClassicAssert.IsTrue(cell.Body.IndexOf("some value") > -1);
TestUtils.VerifyCounts(stringFixture, 0, 1, 0, 0);
}
}
diff --git a/source/fitTest/NUnit/ParseBlankTest.cs b/source/fitTest/NUnit/ParseBlankTest.cs
index db21a32f..c438d456 100644
--- a/source/fitTest/NUnit/ParseBlankTest.cs
+++ b/source/fitTest/NUnit/ParseBlankTest.cs
@@ -1,4 +1,4 @@
-// Copyright © 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2011 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -7,6 +7,7 @@
using fitSharp.Machine.Model;
using fitSharp.Samples;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture]
@@ -23,9 +24,9 @@ public void SetUp()
[Test]
public void MatchesBlankString()
{
- Assert.IsTrue(IsMatch(new ParseBlank(), "blank"));
- Assert.IsTrue(IsMatch(new ParseBlank(), "\r\n\t blank \r\n\t"));
- Assert.IsFalse(IsMatch(new ParseBlank(), "is blank"));
+ ClassicAssert.IsTrue(IsMatch(new ParseBlank(), "blank"));
+ ClassicAssert.IsTrue(IsMatch(new ParseBlank(), "\r\n\t blank \r\n\t"));
+ ClassicAssert.IsFalse(IsMatch(new ParseBlank(), "is blank"));
}
[Test]
@@ -33,7 +34,7 @@ public void TestDoInputBlank()
{
MakeStringFixture();
TestUtils.DoInput(stringFixture, TestUtils.CreateCellRange("Field"), cell);
- Assert.AreEqual("", stringFixture.Field);
+ ClassicAssert.AreEqual("", stringFixture.Field);
TestUtils.VerifyCounts(stringFixture, 0, 0, 0, 0);
}
@@ -42,7 +43,7 @@ public void TestDoCheckBlankRight() {
MakeStringFixture();
stringFixture.Field = "";
TestUtils.DoCheck(stringFixture, TestUtils.CreateCellRange("Field"), cell);
- Assert.AreEqual("", stringFixture.Field);
+ ClassicAssert.AreEqual("", stringFixture.Field);
AssertCellPasses(cell);
AssertValueInBody(cell, "blank");
TestUtils.VerifyCounts(stringFixture, 1, 0, 0, 0);
@@ -52,8 +53,8 @@ public void TestDoCheckBlankRight() {
public void TestDoEvaluateBlankRight() {
MakeStringFixture();
stringFixture.Field = "";
- Assert.IsTrue(service.Compare(new TypedValue(string.Empty), cell));
- Assert.AreEqual("", stringFixture.Field);
+ ClassicAssert.IsTrue(service.Compare(new TypedValue(string.Empty), cell));
+ ClassicAssert.AreEqual("", stringFixture.Field);
AssertValueInBody(cell, "blank");
TestUtils.VerifyCounts(stringFixture, 0, 0, 0, 0);
}
@@ -64,7 +65,7 @@ public void TestDoCheckBlankWrongValue()
MakeStringFixture();
stringFixture.Field = "some value";
TestUtils.DoCheck(stringFixture, TestUtils.CreateCellRange("Field"), cell);
- Assert.AreEqual("some value", stringFixture.Field);
+ ClassicAssert.AreEqual("some value", stringFixture.Field);
AssertCellFails(cell);
AssertValuesInBody(cell, new[] {"blank", "some value"});
TestUtils.VerifyCounts(stringFixture, 0, 1, 0, 0);
@@ -76,7 +77,7 @@ public void TestDoCheckBlankNullValue()
MakeStringFixture();
stringFixture.Field = null;
TestUtils.DoCheck(stringFixture, TestUtils.CreateCellRange("Field"), cell);
- Assert.AreEqual(null, stringFixture.Field);
+ ClassicAssert.AreEqual(null, stringFixture.Field);
AssertCellFails(cell);
AssertValuesInBody(cell, new[] {"blank", "null"});
TestUtils.VerifyCounts(stringFixture, 0, 1, 0, 0);
@@ -88,7 +89,7 @@ public void TestDoCheckBlankWrongTypeRightValue()
MakePersonFixture();
personFixture.Field = new Person("", "");
TestUtils.DoCheck(personFixture, TestUtils.CreateCellRange("Field"), cell);
- Assert.AreEqual("", personFixture.Field.ToString());
+ ClassicAssert.AreEqual("", personFixture.Field.ToString());
AssertCellPasses(cell);
AssertValuesInBody(cell, new[] {"blank"});
TestUtils.VerifyCounts(personFixture, 1, 0, 0, 0);
@@ -99,7 +100,7 @@ public void TestDoCheckBlankWrongTypeWrongValue() {
MakePersonFixture();
personFixture.Field = new Person("john", "doe");
TestUtils.DoCheck(personFixture, TestUtils.CreateCellRange("Field"), cell);
- Assert.AreEqual("john doe", personFixture.Field.ToString());
+ ClassicAssert.AreEqual("john doe", personFixture.Field.ToString());
AssertCellFails(cell);
AssertValuesInBody(cell, new[] {"blank", "john doe"});
TestUtils.VerifyCounts(personFixture, 0, 1, 0, 0);
diff --git a/source/fitTest/NUnit/ParseBooleanTest.cs b/source/fitTest/NUnit/ParseBooleanTest.cs
index 0e8e9e19..f9dc96e4 100644
--- a/source/fitTest/NUnit/ParseBooleanTest.cs
+++ b/source/fitTest/NUnit/ParseBooleanTest.cs
@@ -1,4 +1,4 @@
-// Copyright © 2017 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2017 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -9,6 +9,7 @@
using fitSharp.Machine.Model;
using fitSharp.Samples.Fit;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture] public class ParseBooleanTest {
@@ -31,15 +32,15 @@ public void ParseValidStrings() {
"false", "FALSE", "fAlSe", "FaLsE", "\n\tfalse\n"
};
foreach (string validString in validTrueStrings) {
- Assert.IsTrue(Parse(validString), "Parsing '" + validString + "'");
+ ClassicAssert.IsTrue(Parse(validString), "Parsing '" + validString + "'");
}
foreach (string validString in validFalseStrings) {
- Assert.IsFalse(Parse(validString), "Parsing '" + validString + "'");
+ ClassicAssert.IsFalse(Parse(validString), "Parsing '" + validString + "'");
}
}
[Test] public void ParseInvalidString() {
- Assert.Throws(() => Parse("garbage"));
+ ClassicAssert.Throws(() => Parse("garbage"));
}
private bool Parse(string validString) {
diff --git a/source/fitTest/NUnit/ParseInterpreterTest.cs b/source/fitTest/NUnit/ParseInterpreterTest.cs
index bc0e65c6..86636ccf 100644
--- a/source/fitTest/NUnit/ParseInterpreterTest.cs
+++ b/source/fitTest/NUnit/ParseInterpreterTest.cs
@@ -9,6 +9,7 @@
using fitSharp.Fit.Operators;
using fitSharp.Machine.Model;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture] public class ParseInterpreterTest{
@@ -21,13 +22,13 @@ [Test] public void FixtureIsCreated() {
[Test] public void DomainClassIsWrapped() {
var result = Parse("");
var wrapper = VerifyResult(result);
- Assert.IsNotNull(wrapper.SystemUnderTest as SampleDomain);
+ ClassicAssert.IsNotNull(wrapper.SystemUnderTest as SampleDomain);
}
[Test] public void FixtureWithSUTIsCreated() {
var result = Parse("", new TypedValue("target"));
var sampleDo = VerifyResult(result);
- Assert.AreEqual("target", sampleDo.SystemUnderTest.ToString());
+ ClassicAssert.AreEqual("target", sampleDo.SystemUnderTest.ToString());
}
TypedValue Parse(string inputTables) {
@@ -45,7 +46,7 @@ TypedValue Parse(string inputTables, TypedValue target) {
static T VerifyResult(TypedValue result) where T: class {
var anObject = result.Value as T;
- Assert.IsNotNull(anObject);
+ ClassicAssert.IsNotNull(anObject);
return anObject;
}
diff --git a/source/fitTest/NUnit/ParseTest.cs b/source/fitTest/NUnit/ParseTest.cs
index 8dadb2ca..b543f1f3 100644
--- a/source/fitTest/NUnit/ParseTest.cs
+++ b/source/fitTest/NUnit/ParseTest.cs
@@ -1,4 +1,4 @@
-// Copyright © 2016 Syterra Software Inc. Includes work by Object Mentor, Inc., © 2002 Cunningham & Cunningham, Inc.
+// Copyright � 2016 Syterra Software Inc. Includes work by Object Mentor, Inc., � 2002 Cunningham & Cunningham, Inc.
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -7,6 +7,7 @@
using fitSharp.Machine.Model;
using fitSharp.Parser;
using NUnit.Framework;
+using NUnit.Framework.Legacy;
namespace fit.Test.NUnit {
[TestFixture]
@@ -16,27 +17,27 @@ public class ParseTest
[Test]
public void UnEscapeShouldRemoveHtmlEscapes()
{
- Assert.AreEqual("ab & b>c &&", new HtmlString("a>b & b>c &&").ToPlainText());
- Assert.AreEqual("&&", new HtmlString("&&").ToPlainText());
- Assert.AreEqual("a>b & b>c &&", new HtmlString("a>b & b>c &&").ToPlainText());
+ ClassicAssert.AreEqual("ab & b>c &&", new HtmlString("a>b & b>c &&").ToPlainText());
+ ClassicAssert.AreEqual("&&", new HtmlString("&&").ToPlainText());
+ ClassicAssert.AreEqual("a>b & b>c &&", new HtmlString("a>b & b>c &&").ToPlainText());
}
[Test]
public void UnFormatShouldRemoveHtmlFormattingCodeIfPresent()
{
- Assert.AreEqual("ab",new HtmlString("a b").ToPlainText());
- Assert.AreEqual("ab",new HtmlString("ab ").ToPlainText());
- Assert.AreEqual("aab").ToPlainText());
+ ClassicAssert.AreEqual("ab",new HtmlString("ab ").ToPlainText());
+ ClassicAssert.AreEqual("a | | |