{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class ParameterizedIgnoreAttribute | Test Framework | 2.0.1-exp.2
docs.unity3d.com
"{0}"의 검색 결과

    목차 표시/숨기기

    Class ParameterizedIgnoreAttribute

    This attribute is an alternative to the standard Ignore attribute in NUnit. It allows for ignoring tests based on arguments which were passed to the test method.

    상속
    object
    ParameterizedIgnoreAttribute
    구현
    IWrapTestMethod
    네임스페이스: UnityEngine.TestTools
    어셈블리: solution.dll
    구문
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
    public class ParameterizedIgnoreAttribute : NUnitAttribute, IWrapTestMethod
    예

    The following example shows a method to use the ParameterizedIgnore attribute to ignore only one test with specific combination of arguments, where someString is b and someInt is 10.

    using NUnit.Framework;
    using System.Collections.Generic;
    using UnityEngine.TestTools;
    
    public class MyTestsClass
    {
       public static IEnumerable<TestCaseData> MyTestCaseSource()
       {
           for (int i = 0; i < 5; i++)
           {
               yield return new TestCaseData("a", i);
               yield return new TestCaseData("b", i);
           }
       }
    
       [Test, TestCaseSource(nameof(MyTestCaseSource))]
       [ParameterizedIgnore("b", 3)]
       public void Test(string someString, int someInt)
       {
           Assert.Pass();
       }
    }

    It could also be used together with the Values attribute in NUnit:

    using NUnit.Framework;
    using UnityEngine.TestTools;
    
    public class MyTestsClass
    {
       [Test]
       [ParameterizedIgnore("b", 10)]
       public void Test(
           [Values("a", "b")] string someString,
           [Values(5, 10)] int someInt)
       {
           Assert.Pass();
       }
    }

    생성자

    이름 설명
    ParameterizedIgnoreAttribute(params object[])

    프로퍼티

    이름 설명
    Arguments
    Reason

    메서드

    이름 설명
    Wrap(TestCommand)
    문서 개요
    맨 위로
    Copyright © 2023 Unity Technologies — 상표 및 이용약관
    • 법률정보
    • 개인정보처리방침
    • 쿠키
    • 내 개인정보 판매 금지
    • Your Privacy Choices (Cookie Settings)