Exemplo n.º 1
0
        public void MapToFeature_FeatureWithSimpleProperties_ReturnsFeaturesWithThoseProperties()
        {
            G.Feature feature = this.factory.CreateFeature("Title of the feature", "Description of the feature");

            var mapper = this.factory.CreateMapper();

            var result = mapper.MapToFeature(feature);

            Check.That(result.Name).IsEqualTo("Title of the feature");
            Check.That(result.Description).IsEqualTo("Description of the feature");
        }
Exemplo n.º 2
0
        public void FormatFeature(Feature feature, StringBuilder result)
        {
            if (!feature.Language.Equals("en", StringComparison.InvariantCultureIgnoreCase))
            {
                result.AppendFormat("#language:{0}", feature.Language);
                result.AppendLine();
            }

            FormatTags(feature, result);
            FormatHasDescription(feature, result);
            result.AppendLine();

            if (feature.Background != null)
                FormatBackground(feature.Background, result);

            foreach (var scenarioDefinition in feature.ScenarioDefinitions)
            {
                FormatScenarioDefinition(scenarioDefinition, result);
            }
        }
Exemplo n.º 3
0
 public Feature MapToFeature(G.Feature feature)
 {
     return(this.mapper.Map <Feature>(feature));
 }
Exemplo n.º 4
0
		public void Log (Feature feature)
		{
			Console.WriteLine ("Feature: {0}", feature.Name);
		}
Exemplo n.º 5
0
 public GherkinDocument(Feature feature, Comment[] comments)
 {
     Feature  = feature;
     Comments = comments;
 }
Exemplo n.º 6
0
 public string FormatAst(Feature feature)
 {
     var result = new StringBuilder();
     FormatFeature(feature, result);
     return LineEndingHelper.NormalizeLineEndings(result.ToString());
 }