NUnit.Framework.TestCaseData.SetDescription C# (CSharp) Method

SetDescription() public method

Sets the description for the test case being constructed.
public SetDescription ( string description ) : TestCaseData
description string The description.
return TestCaseData
        public TestCaseData SetDescription(string description)
        {
            this.description = description;
            return this;
        }

Usage Example

        public static IEnumerable<TestCaseData> ExtractMethodTestFactoryMethod()
        {
            string[] files = Directory.GetFiles(@"..\..\Ralph.Core.Tests\ExtractMethodTests\TestCases", "*.cs");
            foreach (var file in files)
            {
                string codefile = Path.GetFullPath(file);
                string codeText = File.ReadAllText(codefile);

                var testCaseData = new TestCaseData(codeText);
                testCaseData.SetName(Path.GetFileNameWithoutExtension(codefile));
                testCaseData.SetDescription(ParseDesc(codeText));

                yield return testCaseData;
            }
        }
All Usage Examples Of NUnit.Framework.TestCaseData::SetDescription