TheoryAttribute
Adding this attribute to a method within a TestFixtureAttribute
class makes the method callable from the NUnit test runner. There is a property
called Description which is optional which you can provide a more detailed test
description. This class cannot be inherited.
using NUnit.Framework.Interfaces;
using NUnit.Framework.Internal.Builders;
using System;
namespace NUnit.Framework
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class TheoryAttribute : CombiningStrategyAttribute, ITestBuilder, IImplyFixture
{
public TheoryAttribute(bool searchInDeclaringTypes = false)
: base(new CombinatorialStrategy(), new ParameterDataProvider(new DatapointProvider(searchInDeclaringTypes), new ParameterDataSourceProvider()))
{
}
}
}