Project.GetTests () Method

Retrieves all tests for this project.

Namespace: Microsoft.Windows.Kits.Hardware.ObjectModel

Assembly: Microsoft.Windows.Kits.Hardware.ObjectModel (in Microsoft.Windows.Kits.Hardware.ObjectModel)

Syntax

Visual Basic

Public Overridable Function GetTests() As IList(Of Test) 
    Dim tests As List(Of Test) = New List(Of Test)()
    For Each productInstance As ProductInstance In Me.GetProductInstances()
        tests.AddRange(productInstance.GetTests())
    NextReturn tests
End Function

C#

public virtual IList<Test> GetTests()
{
    List<Test> tests = new List<Test>();
    foreach (ProductInstance productInstance in this.GetProductInstances())
    {
        tests.AddRange(productInstance.GetTests());
    }
    return tests;
}

Return Value

A collection of all tests for this project.

Remarks

For backwards compatibility with HCK 2.0, returns tests that are tagged with Certification content level. To get tests for other content levels, use the overloaded method that takes a collection of ContentLevelType.

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.