a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
// *********************************************************************
|
|
// Copyright 2007, Andreas Schlapsi
|
|
// This is free software licensed under the MIT license.
|
|
// *********************************************************************
|
|
using System;
|
|
using System.Reflection;
|
|
using NUnit.Core;
|
|
|
|
namespace NUnit.Core.Extensions.RowTest
|
|
{
|
|
public class RowTestSuite : TestSuite
|
|
{
|
|
private static string GetParentName(MethodInfo method)
|
|
{
|
|
if (method == null)
|
|
throw new ArgumentNullException("method");
|
|
|
|
return method.DeclaringType.ToString();
|
|
}
|
|
|
|
private static string GetTestName(MethodInfo method)
|
|
{
|
|
if (method == null)
|
|
throw new ArgumentNullException("method");
|
|
|
|
return method.Name;
|
|
}
|
|
|
|
public RowTestSuite(MethodInfo method)
|
|
: base (GetParentName(method), GetTestName(method))
|
|
{
|
|
}
|
|
|
|
public override TestResult Run(EventListener listener, ITestFilter filter)
|
|
{
|
|
if (this.Parent != null)
|
|
this.Fixture = this.Parent.Fixture;
|
|
|
|
return base.Run(listener, filter);
|
|
}
|
|
|
|
protected override void DoOneTimeSetUp(TestResult suiteResult)
|
|
{
|
|
}
|
|
|
|
protected override void DoOneTimeTearDown(TestResult suiteResult)
|
|
{
|
|
}
|
|
}
|
|
}
|