Assemblies
Namespaces
Types
ActionTargets
ApartmentAttribute
Assert
AssertBase
AssertionException
Assume
AsyncTestDelegate
AuthorAttribute
CancelAfterAttribute
CategoryAttribute
CombinatorialAttribute
CombiningStrategyAttribute
Contains
CultureAttribute
DatapointAttribute
DatapointsAttribute
DatapointSourceAttribute
DefaultFloatingPointToleranceAttribute
DescriptionAttribute
Does
ExceptionExtensions
ExplicitAttribute
Extensions
FixtureLifeCycleAttribute
Guard
Has
IgnoreAttribute
IgnoredTestCaseData
IgnoreException
IncludeExcludeAttribute
InconclusiveException
Is
ITestAction
Iz
LevelOfParallelismAttribute
LifeCycle
MaxTimeAttribute
MultipleAssertException
NetPlatformAttribute
NonParallelizableAttribute
NonTestAssemblyAttribute
NUnitAttribute
NUnitString
OneTimeSetUpAttribute
OneTimeTearDownAttribute
OrderAttribute
OSPlatformConverter
PairwiseAttribute
ParallelizableAttribute
ParallelScope
PlatformAttribute
PropertyAttribute
RandomAttribute
RangeAttribute
RepeatAttribute
RequiresThreadAttribute
Result
Result<T>
ResultStateException
RetryAttribute
SequentialAttribute
SetCultureAttribute
SetUICultureAttribute
SetUpAttribute
SetUpFixtureAttribute
SingleThreadedAttribute
SuccessException
TearDownAttribute
TestActionAttribute
TestAssemblyDirectoryResolveAttribute
TestAttribute
TestCaseAttribute
TestCaseAttribute<T>
TestCaseAttribute<T1, T2>
TestCaseAttribute<T1, T2, T3>
TestCaseAttribute<T1, T2, T3, T4>
TestCaseAttribute<T1, T2, T3, T4, T5>
TestCaseData
TestCaseData<T>
TestCaseData<T1, T2>
TestCaseData<T1, T2, T3>
TestCaseData<T1, T2, T3, T4>
TestCaseData<T1, T2, T3, T4, T5>
TestCaseSourceAttribute
TestContext
TestDelegate
TestFixtureAttribute
TestFixtureData
TestFixtureSourceAttribute
TestOfAttribute
TestParameters
TheoryAttribute
Throws
TimeoutAttribute
ValuesAttribute
ValueSourceAttribute
Warn
XmlExtensions
ExplicitAttribute
Marks an assembly, test fixture or test method such that it will only run if explicitly
executed from the GUI, command line or included within a test filter.
The test will not be run simply because an enclosing suite is run.
using NUnit .
Framework .
Interfaces ;
using NUnit .
Framework .
Internal ;
using System ;
using System .
Runtime .
CompilerServices ;
namespace NUnit .
Framework
{
[
AttributeUsage (
AttributeTargets .
Assembly |
AttributeTargets .
Class |
AttributeTargets .
Method ,
AllowMultiple =
false ,
Inherited =
false )]
public class ExplicitAttribute :
NUnitAttribute ,
IApplyToTest
{
[
System .
Runtime .
CompilerServices .
Nullable (
2 )]
private readonly string _reason ;
public ExplicitAttribute ()
{
}
[
System .
Runtime .
CompilerServices .
NullableContext (
2 )]
public ExplicitAttribute (
string reason )
{
_reason =
reason ;
}
[
System .
Runtime .
CompilerServices .
NullableContext (
1 )]
public void ApplyToTest (
Test test )
{
if (
test .
RunState !=
0 &&
test .
RunState !=
RunState .
Ignored ) {
test .
RunState =
RunState .
Explicit ;
if (
_reason !=
null )
test .
Properties .
Set (
"_SKIPREASON" ,
_reason );
}
}
}
}