using System; namespace UnityEngine.TestTools { /// /// PostBuildCleanupWithTestData attributes run if the respective test or test class is in the current test run. The test is included either by running all tests or setting a filter that includes the test. If multiple tests reference the same pre-built setup or post-build cleanup, then it only runs once. /// [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)] public class PostBuildCleanupWithTestDataAttribute : Attribute { /// /// Initializes and returns an instance of PostBuildCleanupWithTestDataAttribute by type. /// /// The type of the target class. public PostBuildCleanupWithTestDataAttribute(Type targetClass) { TargetClass = targetClass; } /// /// Initializes and returns an instance of PostBuildCleanupWithTestDataAttribute by class name. /// /// The name of the target class. public PostBuildCleanupWithTestDataAttribute(string targetClassName) { TargetClass = AttributeHelper.GetTargetClassFromName(targetClassName, typeof(IPostbuildCleanupWithTestData)); } internal Type TargetClass { get; private set; } } }