Udostępnij za pośrednictwem


GenericParameterHelper Class

This class is a placeholder for use with generics. It helps you test generic types by letting you pass non-specific type arguments.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Syntax

'Declaration
Public Class GenericParameterHelper _
    Implements IComparable, IEnumerable, ICloneable
'Usage
Dim instance As GenericParameterHelper
public class GenericParameterHelper : IComparable, 
    IEnumerable, ICloneable
public ref class GenericParameterHelper : IComparable, 
    IEnumerable, ICloneable
public class GenericParameterHelper implements IComparable, IEnumerable, ICloneable

Remarks

A unit test might not be able to pass a real type to a generic method that it is testing. That code can instead pass this generic placeholder.

When the Team System testing tools generates a unit test for testing a generic type, the calls that test that generic type use placeholder generic type arguments.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.TestTools.UnitTesting.GenericParameterHelper

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

GenericParameterHelper Members

Microsoft.VisualStudio.TestTools.UnitTesting Namespace