Search Results for

    Show / Hide Table of Contents

    Interface ITestCaseBuilder

    The ITestCaseBuilder interface is exposed by a class that knows how to build a test from a specified method, possibly containing child test cases.

    Namespace: NUnit.Framework.Interfaces
    Assembly: nunit.framework.dll
    Syntax
    public interface ITestCaseBuilder

    Methods

    View Source

    BuildFrom(IMethodInfo, Test?)

    Builds a single test from the specified method and context, possibly containing child test cases.

    Declaration
    Test? BuildFrom(IMethodInfo method, Test? suite)
    Parameters
    Type Name Description
    IMethodInfo method

    The method to be used as a test case

    Test suite

    The test suite being populated, or null

    Returns
    Type Description
    Test
    View Source

    CanBuildFrom(IMethodInfo, Test?)

    Examine the method and determine if it is suitable for this builder to use in building a TestCase to be included in the suite being populated.

    Note that returning false will cause the method to be ignored in loading the tests. If it is desired to load the method but label it as non-runnable, ignored, etc., then this method must return true.

    Declaration
    bool CanBuildFrom(IMethodInfo method, Test? suite)
    Parameters
    Type Name Description
    IMethodInfo method

    The test method to examine

    Test suite

    The suite being populated

    Returns
    Type Description
    bool
    • 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