本文整理匯總了C#中System.Test.AddComment方法的典型用法代碼示例。如果您正苦於以下問題:C# Test.AddComment方法的具體用法?C# Test.AddComment怎麽用?C# Test.AddComment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Test
的用法示例。
在下文中一共展示了Test.AddComment方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: add_comment
public void add_comment()
{
var test = new Test("some test");
test.AddComment("some text");
test.Parts[0].ShouldBeOfType<Comment>().Text.ShouldEqual("some text");
}
示例2: readFromChildNode
private void readFromChildNode(INode node, Test test)
{
if (node.IsComment())
{
test.AddComment(node.InnerText);
}
else if (node.IsTags())
{
test.AddTags(node.InnerText);
}
else
{
Section section = ReadSection(node);
test.Add(section);
}
}
示例3: SetUp
public void SetUp()
{
var project = new Project
{
BinaryFolder = string.Empty,
ProjectFolder = "",
TestFolder = ""
};
test = new Test("Test001");
test.AddComment("some comment");
project.Save(test);
project.RenameTest(test, "New Name");
}
示例4: delete_a_test_file
public void delete_a_test_file()
{
var project = new Project
{
BinaryFolder = string.Empty,
ProjectFolder = "",
TestFolder = ""
};
var test = new Test("test to be saved");
test.AddComment("some comment");
test.FileName = "Test001.xml";
project.Save(test);
File.Exists("Test001.xml").ShouldBeTrue();
project.DeleteFile(test);
File.Exists("Test001.xml").ShouldBeFalse();
}
示例5: save_and_load_a_test
public void save_and_load_a_test()
{
var project = new Project
{
BinaryFolder = string.Empty,
ProjectFolder = "",
TestFolder = ""
};
var test = new Test("test to be saved");
test.AddComment("some comment");
test.FileName = "Test001.xml";
project.Save(test);
Test test2 = new TestReader().ReadFromFile(test.FileName);
test2.Name.ShouldEqual(test.Name);
test2.Parts.Count.ShouldEqual(1);
test2.FileName.ShouldEqual("Test001.xml");
}