本文整理汇总了C#中System.Test.AddTags方法的典型用法代码示例。如果您正苦于以下问题:C# Test.AddTags方法的具体用法?C# Test.AddTags怎么用?C# Test.AddTags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Test
的用法示例。
在下文中一共展示了Test.AddTags方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Adding_tags_should_add_to_existing_tags
public void Adding_tags_should_add_to_existing_tags()
{
Test test = new Test("test");
List<string> tags = new List<string> { "tagged", "another" };
tags.ForEach(x => test.AddTags(x));
tags.ForEach(tag => test.GetTags().AllTags.Contains(tag));
}
示例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: the_filter_should_match_tests_with_multiple_tags
public void the_filter_should_match_tests_with_multiple_tags()
{
Test testing = new Test("testing");
testing.AddTags("testing");
Test tag = new Test("tagged");
tag.AddTags("tag");
filter.Tags = "tag, testing";
filter.Matches(testing).ShouldBeTrue();
filter.Matches(tag).ShouldBeTrue();
}
示例4: the_filter_should_match_tests_with_matching_tags
public void the_filter_should_match_tests_with_matching_tags()
{
Test noTags = new Test("noTags");
Test tagged = new Test("tagged");
tagged.AddTags("tag");
filter.Tags = "tag";
filter.Matches(noTags).ShouldBeFalse();
filter.Matches(tagged).ShouldBeTrue();
}
示例5: the_filter_should_match_no_tests_when_using_tags_that_are_not_used
public void the_filter_should_match_no_tests_when_using_tags_that_are_not_used()
{
Test noTags = new Test("noTags");
Test tagged = new Test("tagged");
tagged.AddTags("tag");
filter.Tags = "nothing";
filter.Matches(noTags).ShouldBeFalse();
filter.Matches(tagged).ShouldBeFalse();
}
示例6: the_filter_should_match_all_tests_when_no_tags_are_applied
public void the_filter_should_match_all_tests_when_no_tags_are_applied()
{
Test noTags = new Test("noTags");
Test tagged = new Test("tagged");
tagged.AddTags("tag");
filter.Matches(noTags).ShouldBeTrue();
filter.Matches(tagged).ShouldBeTrue();
}