PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/src/NUnit/framework/Attributes/DescriptionAttribute.cs

#
C# | 37 lines | 17 code | 4 blank | 16 comment | 0 complexity | 86e19c0868a016281596af3cbf98773c MD5 | raw file
 1// ****************************************************************
 2// Copyright 2007, Charlie Poole
 3// This is free software licensed under the NUnit license. You may
 4// obtain a copy of the license at http://nunit.org
 5// ****************************************************************
 6
 7using System;
 8
 9namespace NUnit.Framework
10{
11	/// <summary>
12	/// Attribute used to provide descriptive text about a 
13	/// test case or fixture.
14	/// </summary>
15	[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
16	public class DescriptionAttribute : Attribute
17	{
18		string description;
19
20		/// <summary>
21		/// Construct the attribute
22		/// </summary>
23		/// <param name="description">Text describing the test</param>
24		public DescriptionAttribute(string description)
25		{
26			this.description=description;
27		}
28
29		/// <summary>
30		/// Gets the test description
31		/// </summary>
32		public string Description
33		{
34			get { return description; }
35		}
36	}
37}