Class LuceneTestCase.RepeatAttribute
Specifies that a test should be run multiple times. If any repetition fails, the remaining ones are not run and a failure is reported.
Implements
Inherited Members
Namespace: Lucene.Net.Util
Assembly: Lucene.Net.TestFramework.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class LuceneTestCase.RepeatAttribute : Attribute, IRepeatTest, ICommandWrapper
Remarks
This attribute differs from NUnit.Framework.RepeatAttribute in that it is aware of RandomizedContext and will reset the test seed on each iteration. As a result, if there is a test failure, the seed that is reported will duplicate the exact test conditions on the first try.
Constructors
RepeatAttribute(int)
Initializes a new instance of LuceneTestCase.RepeatAttribute.
Declaration
public RepeatAttribute(int repeatCount)
Parameters
| Type | Name | Description |
|---|---|---|
| int | repeatCount | The number of times to run the test. |
Remarks
This attribute differs from NUnit.Framework.RepeatAttribute in that it is aware of RandomizedContext and will reset the test seed on each iteration. As a result, if there is a test failure, the seed that is reported will duplicate the exact test conditions on the first try.
Methods
Wrap(TestCommand)
Wrap a command and return the result.
Declaration
public TestCommand Wrap(TestCommand command)
Parameters
| Type | Name | Description |
|---|---|---|
| TestCommand | command | The command to be wrapped. |
Returns
| Type | Description |
|---|---|
| TestCommand | The wrapped command. |
Remarks
This attribute differs from NUnit.Framework.RepeatAttribute in that it is aware of RandomizedContext and will reset the test seed on each iteration. As a result, if there is a test failure, the seed that is reported will duplicate the exact test conditions on the first try.