本文整理汇总了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");
}