Search Results for

    Show / Hide Table of Contents

    Class RangeAttribute

    Supplies a range of values to an individual parameter of a parameterized test.

    Inheritance
    object
    Attribute
    NUnitAttribute
    RangeAttribute
    Implements
    IParameterDataSource
    Inherited Members
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, bool)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, bool)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo, bool)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, bool)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, bool)
    Attribute.GetCustomAttributes(Module, Type, bool)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, bool)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, bool)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, bool)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, bool)
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, bool)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, bool)
    Attribute.Equals(object)
    Attribute.GetHashCode()
    Attribute.Match(object)
    Attribute.IsDefaultAttribute()
    Attribute.TypeId
    object.GetType()
    object.MemberwiseClone()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: NUnit.Framework
    Assembly: nunit.framework.dll
    Syntax
    [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true, Inherited = false)]
    public class RangeAttribute : NUnitAttribute, IParameterDataSource

    Constructors

    View Source

    RangeAttribute(double, double, double)

    Constructs a range of double values with the specified step size.

    Declaration
    public RangeAttribute(double from, double to, double step)
    Parameters
    Type Name Description
    double from
    double to
    double step
    View Source

    RangeAttribute(int, int)

    Constructs a range of int values using the default step of 1.

    Declaration
    public RangeAttribute(int from, int to)
    Parameters
    Type Name Description
    int from
    int to
    View Source

    RangeAttribute(int, int, int)

    Constructs a range of int values with the specified step size.

    Declaration
    public RangeAttribute(int from, int to, int step)
    Parameters
    Type Name Description
    int from
    int to
    int step
    View Source

    RangeAttribute(long, long)

    Constructs a range of long values using a default step of 1.

    Declaration
    public RangeAttribute(long from, long to)
    Parameters
    Type Name Description
    long from
    long to
    View Source

    RangeAttribute(long, long, long)

    Constructs a range of long values with the specified step size.

    Declaration
    public RangeAttribute(long from, long to, long step)
    Parameters
    Type Name Description
    long from
    long to
    long step
    View Source

    RangeAttribute(float, float, float)

    Constructs a range of float values with the specified step size.

    Declaration
    public RangeAttribute(float from, float to, float step)
    Parameters
    Type Name Description
    float from
    float to
    float step
    View Source

    RangeAttribute(uint, uint)

    Constructs a range of uint values using the default step of 1.

    Declaration
    [CLSCompliant(false)]
    public RangeAttribute(uint from, uint to)
    Parameters
    Type Name Description
    uint from
    uint to
    View Source

    RangeAttribute(uint, uint, uint)

    Constructs a range of uint values with the specified step size.

    Declaration
    [CLSCompliant(false)]
    public RangeAttribute(uint from, uint to, uint step)
    Parameters
    Type Name Description
    uint from
    uint to
    uint step
    View Source

    RangeAttribute(ulong, ulong)

    Constructs a range of ulong values using the default step of 1.

    Declaration
    [CLSCompliant(false)]
    public RangeAttribute(ulong from, ulong to)
    Parameters
    Type Name Description
    ulong from
    ulong to
    View Source

    RangeAttribute(ulong, ulong, ulong)

    Constructs a range of ulong values with the specified step size.

    Declaration
    [CLSCompliant(false)]
    public RangeAttribute(ulong from, ulong to, ulong step)
    Parameters
    Type Name Description
    ulong from
    ulong to
    ulong step

    Methods

    View Source

    GetData(IParameterInfo)

    Retrieves a list of arguments which can be passed to the specified parameter.

    Declaration
    public IEnumerable GetData(IParameterInfo parameter)
    Parameters
    Type Name Description
    IParameterInfo parameter

    The parameter of a parameterized test.

    Returns
    Type Description
    IEnumerable
    View Source

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Implements

    IParameterDataSource
    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0