Ejemplo n.º 1
0
 public Feature(Tag[] tags, Location location, string language, string keyword, string name, string description, Background background, ScenarioDefinition[] scenarioDefinitions, Comment[] comments)
 {
     Tags = tags;
     Location = location;
     Language = language;
     Keyword = keyword;
     Name = name;
     Description = description;
     Background = background;
     ScenarioDefinitions = scenarioDefinitions;
     Comments = comments;
 }
Ejemplo n.º 2
0
        public Comment MapToComment(G.Comment comment)
        {
            if (comment == null)
            {
                return(null);
            }

            return(new Comment
            {
                Text = comment.Text.Trim(),
                Location = this.MapToLocation(comment.Location)
            });
        }
        public void MapToComment_RegularComment_ReturnsComment()
        {
            var mapper = this.factory.CreateMapper();

            G.Comment comment = this.factory.CreateComment("# A comment", 1, 2);
            Comment   result  = mapper.MapToComment(comment);

            Check.That(result).IsNotNull();
            Check.That(result.Text).IsEqualTo("# A comment");
            Check.That(result.Location.Line).IsEqualTo(1);
            Check.That(result.Location.Column).IsEqualTo(2);
            Check.That(result.Type).IsEqualTo(CommentType.Normal);
        }
Ejemplo n.º 4
0
        public SpecFlowFeature(Tag[] tags, Location location, string language, string keyword, string name, string description, ScenarioDefinition[] children, Comment[] comments, string sourceFilePath)
            : base(tags, location, language, keyword, name, description, children, comments)
        {
            this.SourceFilePath = sourceFilePath;

            if (Children != null)
            {
                ScenarioDefinitions = Children.Where(child => !(child is Background)).ToList();

                var background = Children.SingleOrDefault(child => child is Background);

                if (background != null)
                {
                    Background = (Background)background;
                }
            }
        }
Ejemplo n.º 5
0
 public Comment MapToComment(G.Comment comment)
 {
     return(this.mapper.Map <Comment>(comment));
 }
Ejemplo n.º 6
0
 public SpecFlowDocument(SpecFlowFeature feature, Comment[] comments, string sourceFilePath)
     : base(feature, comments)
 {
     this.SourceFilePath = sourceFilePath;
 }
Ejemplo n.º 7
0
 public SpecFlowFeature(Tag[] tags, Location location, string language, string keyword, string name, string description, Background background, ScenarioDefinition[] scenarioDefinitions, Comment[] comments, string sourceFilePath) : base(tags, location, language, keyword, name, description, background, scenarioDefinitions, comments)
 {
     this.SourceFilePath = sourceFilePath;
 }