PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/Utilities/FakeNUnitFramework/CategoryAttribute.cs

#
C# | 47 lines | 26 code | 4 blank | 17 comment | 0 complexity | 592e5d3a8faf53e709ca94abd4ecd067 MD5 | raw file
Possible License(s): Apache-2.0
  1. using System;
  2. namespace NUnit.Framework
  3. {
  4. /// <summary>
  5. /// Nothing is in here, this is just a fake class to help tools to detect
  6. /// unit tests. Helper to simulate NUnit unit tests to be detected by test
  7. /// unit runners like ReSharper. TestDriven.NET however requires that a
  8. /// supported NUnit.Framework.dll is used, which is too much hassle for us,
  9. /// but you can easily do it if you like.
  10. /// </summary>
  11. [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class |
  12. AttributeTargets.Assembly, AllowMultiple = true)]
  13. public class CategoryAttribute : Attribute
  14. {
  15. #region Constants
  16. /// <summary>
  17. /// Tests in the categories "LongRunning" and "Visual" will be excluded,
  18. /// they should not be run automatically, see
  19. /// http://DeltaEngine.net/Wiki.CodingConventions
  20. /// </summary>
  21. public const string LongRunning = "LongRunning";
  22. /// <summary>
  23. /// Tests in the categories "LongRunning" and "Visual" will be excluded,
  24. /// they should not be run automatically (same goes for "Static" or
  25. /// "Integration"), see http://DeltaEngine.net/Wiki.CodingConventions
  26. /// </summary>
  27. public const string Visual = "Visual";
  28. #endregion
  29. #region Name (Public)
  30. public string Name
  31. {
  32. get;
  33. set;
  34. }
  35. #endregion
  36. #region Constructors
  37. public CategoryAttribute(string setCategoryName)
  38. {
  39. Name = setCategoryName;
  40. }
  41. #endregion
  42. }
  43. }