当前位置: 首页>>代码示例>>C#>>正文


C# Feature.AddTags方法代码示例

本文整理汇总了C#中Feature.AddTags方法的典型用法代码示例。如果您正苦于以下问题:C# Feature.AddTags方法的具体用法?C# Feature.AddTags怎么用?C# Feature.AddTags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Feature的用法示例。


在下文中一共展示了Feature.AddTags方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Should_set_tags_for_feature_event

 public void Should_set_tags_for_feature_event()
 {
     var feature = new Feature("featureTitle");
     feature.AddTags(new[] { "tag1", "tag2" });
     sut.OnFeatureStartedEvent(feature);
     CollectionAssert.AreEqual(new[] { "tag1", "tag2" }, featureContext.Tags);
 }
开发者ID:smhabdoli,项目名称:NBehave,代码行数:7,代码来源:ContextHandlerSpec.cs

示例2: Should_remove_tags_before_new_feature_starts

 public void Should_remove_tags_before_new_feature_starts()
 {
     var feature = new Feature("featureTitle");
     feature.AddTags(new[] { "tag1", "tag2" });
     sut.OnFeatureStartedEvent(feature);
     CollectionAssert.IsNotEmpty(featureContext.Tags);
     sut.OnFeatureFinishedEvent();
     CollectionAssert.IsNotEmpty(featureContext.Tags);
     sut.OnFeatureStartedEvent(new Feature("featureTitle 2"));
     CollectionAssert.IsEmpty(featureContext.Tags);
 }
开发者ID:smhabdoli,项目名称:NBehave,代码行数:11,代码来源:ContextHandlerSpec.cs

示例3: CreateFeature

 private void CreateFeature(string title, string narrative, int sourceLine)
 {
     var feature = new Feature(title, narrative, file, sourceLine);
     currentFeature = feature;
     events.Enqueue(new FeatureEvent(feature, e =>
         {
             feature.AddTags(e.Tags);
             FeatureEvent.Invoke(this, new EventArgs<Feature>(feature));
         }));
 }
开发者ID:smhabdoli,项目名称:NBehave,代码行数:10,代码来源:GherkinScenarioParser.cs

示例4: Should_update_stepContext_with_tags

 public void Should_update_stepContext_with_tags()
 {
     const string featureTitle = "feature title";
     var feature = new Feature(featureTitle);
     feature.AddTags(new[] { "a" });
     sut.OnFeatureStartedEvent(feature);
     const string scenarioTitle = "scenario title";
     var scenario = new Scenario(scenarioTitle, "", new Feature("ignored"));
     scenario.AddTags(new[] { "a", "b" });
     sut.OnScenarioStartedEvent(scenario);
     var step = "Given something".AsStringStep("");
     sut.OnStepStartedEvent(step);
     CollectionAssert.AreEquivalent(new[] { "a", "b" }, stepContext.Tags);
 }
开发者ID:smhabdoli,项目名称:NBehave,代码行数:14,代码来源:ContextHandlerSpec.cs


注:本文中的Feature.AddTags方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。