Search Results for

    Show / Hide Table of Contents

    Class ValuesAttribute

    Provides literal arguments for an individual parameter of a test.

    Inheritance
    object
    Attribute
    NUnitAttribute
    ValuesAttribute
    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.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: NUnit.Framework
    Assembly: nunit.framework.dll
    Syntax
    [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
    public class ValuesAttribute : NUnitAttribute, IParameterDataSource

    Constructors

    View Source

    ValuesAttribute()

    Constructs for use with an Enum parameter. Will pass every enum value in to the test.

    Declaration
    public ValuesAttribute()
    View Source

    ValuesAttribute(object?)

    Construct with one argument

    Declaration
    public ValuesAttribute(object? arg1)
    Parameters
    Type Name Description
    object arg1
    View Source

    ValuesAttribute(object?, object?)

    Construct with two arguments

    Declaration
    public ValuesAttribute(object? arg1, object? arg2)
    Parameters
    Type Name Description
    object arg1
    object arg2
    View Source

    ValuesAttribute(object?, object?, object?)

    Construct with three arguments

    Declaration
    public ValuesAttribute(object? arg1, object? arg2, object? arg3)
    Parameters
    Type Name Description
    object arg1
    object arg2
    object arg3
    View Source

    ValuesAttribute(params object?[]?)

    Construct with an array of arguments

    Declaration
    public ValuesAttribute(params object?[]? args)
    Parameters
    Type Name Description
    object[] args

    Fields

    View Source

    data

    The collection of data to be returned. Must be set by any derived attribute classes. We use an object[] so that the individual elements may have their type changed in GetData if necessary

    Declaration
    protected object?[] data
    Field Value
    Type Description
    object[]

    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

    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