다음을 통해 공유


TestAttribute 클래스

정의

클래스 내 의 메서드에 이 특성을 추가하면 NUnit 테스트 실행기에서 메서드를 호출할 수 있습니다. 자세한 테스트 설명을 제공할 수 있는 선택 사항인 Description이라는 속성이 있습니다. 이 클래스는 상속될 수 없습니다.

[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class TestAttribute : NUnit.Framework.NUnitAttribute, NUnit.Framework.Internal.IApplyToTest
type TestAttribute = class
    inherit NUnitAttribute
    interface IApplyToTest
상속
TestAttribute
특성
구현

예제

[TestFixture] public class Fixture { [Test] public void MethodToTest() {} [Test(Description = "more detailed description")] publc void TestDescriptionMethod() {} }

생성자

TestAttribute()

클래스 내 의 메서드에 이 특성을 추가하면 NUnit 테스트 실행기에서 메서드를 호출할 수 있습니다. 자세한 테스트 설명을 제공할 수 있는 선택 사항인 Description이라는 속성이 있습니다. 이 클래스는 상속될 수 없습니다.

속성

Description

이 테스트에 대한 설명 텍스트

메서드

ApplyToTest(Test)

클래스 내 의 메서드에 이 특성을 추가하면 NUnit 테스트 실행기에서 메서드를 호출할 수 있습니다. 자세한 테스트 설명을 제공할 수 있는 선택 사항인 Description이라는 속성이 있습니다. 이 클래스는 상속될 수 없습니다.

적용 대상