Esempio 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");
        }
Esempio 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);
            }
        }
Esempio n. 3
0
 public Feature MapToFeature(G.Feature feature)
 {
     return(this.mapper.Map <Feature>(feature));
 }
Esempio n. 4
0
		public void Log (Feature feature)
		{
			Console.WriteLine ("Feature: {0}", feature.Name);
		}
Esempio n. 5
0
 public GherkinDocument(Feature feature, Comment[] comments)
 {
     Feature  = feature;
     Comments = comments;
 }
Esempio n. 6
0
 public string FormatAst(Feature feature)
 {
     var result = new StringBuilder();
     FormatFeature(feature, result);
     return LineEndingHelper.NormalizeLineEndings(result.ToString());
 }