Fork me on GitHub
  • API

    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.

    Inheritance
    object
    Attribute
    LuceneTestCase.RepeatAttribute
    Implements
    IRepeatTest
    ICommandWrapper
    Inherited Members
    Attribute.Equals(object)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, bool)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, bool)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, bool)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, bool)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, bool)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, bool)
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, bool)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, bool)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
    Attribute.GetHashCode()
    Attribute.IsDefaultAttribute()
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, bool)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, bool)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, bool)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, bool)
    Attribute.Match(object)
    Attribute.TypeId
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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.

    Implements

    NUnit.Framework.Interfaces.IRepeatTest
    NUnit.Framework.Interfaces.ICommandWrapper
    Back to top Copyright © 2025 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.