[Fat-develop] FAT/test/FAT.Test/Web CreateTestModelTest.cs,1.2,1.3
Brought to you by:
exortech
|
From: <exo...@us...> - 2004-01-20 06:01:31
|
Update of /cvsroot/fat/FAT/test/FAT.Test/Web
In directory sc8-pr-cvs1:/tmp/cvs-serv9446/test/FAT.Test/Web
Modified Files:
CreateTestModelTest.cs
Log Message:
parser is now configurable. configuration is used as factory for parser
Index: CreateTestModelTest.cs
===================================================================
RCS file: /cvsroot/fat/FAT/test/FAT.Test/Web/CreateTestModelTest.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CreateTestModelTest.cs 14 Dec 2003 21:30:28 -0000 1.2
--- CreateTestModelTest.cs 20 Jan 2004 06:01:20 -0000 1.3
***************
*** 11,14 ****
--- 11,26 ----
public class CreateTestModelTest : Assertion
{
+ private Mock mockParser;
+ private Mock mockRunner;
+ private DefaultPageModel model;
+
+ [SetUp]
+ protected void SetUp()
+ {
+ mockParser = new DynamicMock(typeof(ITestParser));
+ mockRunner = new DynamicMock(typeof(ITestRunner));
+ model = new DefaultPageModel((ITestParser)mockParser.MockInstance, (ITestRunner)mockRunner.MockInstance);
+ }
+
[Test]
public void RunTest()
***************
*** 17,27 ****
ITestResult testResult = CreateTestResults();
- Mock mockParser = new DynamicMock(typeof(ITestParser));
mockParser.ExpectAndReturn("Parse", test, "testName", "testContent", "setup", "teardown");
-
- Mock mockRunner = new DynamicMock(typeof(ITestRunner));
mockRunner.ExpectAndReturn("Run", testResult, test);
- DefaultPageModel model = new DefaultPageModel((ITestParser)mockParser.MockInstance, (ITestRunner)mockRunner.MockInstance);
model.Run("testName", "fixture", "testContent", "setup", "teardown");
--- 29,35 ----
***************
*** 33,37 ****
public void CreateResultsTable()
{
- DefaultPageModel model = new DefaultPageModel();
Table table = model.CreateResultsTable(CreateTestResults());
--- 41,44 ----
***************
*** 65,67 ****
// }
}
! }
--- 72,74 ----
// }
}
! }
\ No newline at end of file
|