1
// *********************************************************************
2
// Copyright 2007, Andreas Schlapsi
3
// This is free software licensed under the MIT license.
4
// *********************************************************************
6
using System.Reflection;
9
using NUnit.Framework.SyntaxHelpers;
11
namespace NUnitExtension.RowTest.AddIn.UnitTests
14
public class RowTestSuiteTest : BaseTestFixture
17
public void Initialize()
19
MethodInfo method = GetRowTestMethodWith2Rows();
21
RowTestSuite testSuite = new RowTestSuite(method);
23
string pathName = method.DeclaringType.ToString();
24
Assert.That(testSuite.TestName.FullName, Is.EqualTo (pathName + "." + method.Name));
30
TestClass fixture = new TestClass();
32
TestSuite parentSuite = new TestSuite("ParentSuiteName", "Name");
33
parentSuite.Fixture = fixture;
35
RowTestSuite rowTestSuite = new RowTestSuite(GetRowTestMethodWith2Rows());
36
parentSuite.Add(rowTestSuite);
38
rowTestSuite.Run(new NullListener());
40
Assert.That(rowTestSuite.Fixture, Is.SameAs(fixture));
44
public void Run_WithoutParent()
46
RowTestSuite rowTestSuite = new RowTestSuite(GetRowTestMethodWith2Rows());
48
rowTestSuite.Run(new NullListener());
50
Assert.That(rowTestSuite.Fixture, Is.Null);
54
public void Run_WithTestFilter()
56
TestClass fixture = new TestClass();
58
TestSuite parentSuite = new TestSuite("ParentSuiteName", "Name");
59
parentSuite.Fixture = fixture;
61
RowTestSuite rowTestSuite = new RowTestSuite(GetRowTestMethodWith2Rows());
62
parentSuite.Add(rowTestSuite);
64
rowTestSuite.Run(new NullListener(), TestFilter.Empty);
66
Assert.That(rowTestSuite.Fixture, Is.SameAs(fixture));