~nunit-core/nunitv2/2.5

« back to all changes in this revision

Viewing changes to addins/RowTest/NUnitExtension.RowTest.Tests/SetUpMethodsTestFixture.cs

  • Committer: charliepoole
  • Date: 2008-05-05 22:17:22 UTC
  • Revision ID: vcs-imports@canonical.com-20080505221722-7bdjujqed8pk6al3
Add back RowTestExtension as a separately compiled assembly, bundled
with NUnit, and modify build script to handle addins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// *********************************************************************
 
2
// Copyright 2007, Andreas Schlapsi
 
3
// This is free software licensed under the MIT license. 
 
4
// *********************************************************************
 
5
using System;
 
6
using NUnit.Framework;
 
7
using NUnitExtension.RowTest;
 
8
 
 
9
namespace NUnitExtension.RowTest.Tests
 
10
{
 
11
        [TestFixture]
 
12
        public class SetUpMethodsTestFixture
 
13
        {
 
14
                private bool testFixtureSetUpHasRun = false;
 
15
                private bool setUpHasRun = false;
 
16
        private string setUpByTestFixtureSetUp;
 
17
        private string setUpByTestSetUp;
 
18
 
 
19
                [TestFixtureSetUp]
 
20
                public void TestFixtureSetUp()
 
21
                {
 
22
                        setUpByTestFixtureSetUp = "So Long,";
 
23
                        testFixtureSetUpHasRun = true;
 
24
                }
 
25
                
 
26
                [SetUp]
 
27
                public void SetUp()
 
28
                {
 
29
                        setUpByTestSetUp = "and Thanks for All the Fish";
 
30
                        setUpHasRun = true;
 
31
                }
 
32
                
 
33
                [RowTest]
 
34
                [Row("So Long,", "and Thanks for All the Fish")]
 
35
                public void ClassMemberTest (string string1, string string2)
 
36
                {
 
37
                        Assert.IsTrue(testFixtureSetUpHasRun);
 
38
                        Assert.IsTrue(setUpHasRun);
 
39
                        Assert.AreEqual(string1, setUpByTestFixtureSetUp);
 
40
                        Assert.AreEqual(string2, setUpByTestSetUp);
 
41
                }
 
42
 
 
43
        [Test]
 
44
        public void PrivateClassMemberTest()
 
45
        {
 
46
            Assert.AreEqual(setUpByTestFixtureSetUp, "So Long,");
 
47
            Assert.AreEqual(setUpByTestSetUp, "and Thanks for All the Fish");
 
48
        }
 
49
        }
 
50
}