using System; using NUnit.Framework; using NUnit.Framework.Interfaces; using NUnit.Framework.Internal; namespace Unity.PerformanceTesting { /// /// Test attribute to specify test version. /// [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)] public class VersionAttribute : NUnitAttribute, IApplyToTest { /// /// Test version. /// public string Version { get; } /// /// Adds attribute to specify test version. /// /// Version of the test. public VersionAttribute(string version) { Version = version; } /// /// Used by NUnit to apply version to properties. /// /// An NUnit test to apply the version property to. public void ApplyToTest(Test test) { test.Properties.Add("Version", this); } } }