AddComment() public method

public AddComment ( string text ) : Comment
text string
return Comment
        public void CreateSampleSteps(Section section)
        {
            section.AddComment($"Implemented by {implementation}");

            foreach (var grammar in grammars.OrderBy(x => x.key))
            {
                if (IsMissing)
                {
                    section.AddComment($"## {grammar.key} (*Missing in code*)");
                }
                else
                {
                    section.AddComment("## " + grammar.key);
                }

                try
                {
                    section.Children.Add(grammar.ToSampleStep());
                }
                catch (Exception)
                {
                    ConsoleWriter.Write(ConsoleColor.Yellow, $"Unable to build a sample step for grammar {grammar.key} in fixture {key}. Check the grammar errors.");
                }
            }
        }
        public void section_with_a_single_comment()
        {
            var section = new Section("Math");
            section.AddComment("some foo");

            Debug.WriteLine(section.ToJson());
        }
Exemplo n.º 3
0
        public void CreateSampleSteps(Section section)
        {
            section.AddComment($"Implemented by {implementation}");

            foreach (var grammar in grammars.OrderBy(x => x.key))
            {
                if (IsMissing)
                {
                    section.AddComment($"## {grammar.key} (*Missing in code*)");
                }
                else
                {
                    section.AddComment("## " + grammar.key);
                }

                section.Children.Add(grammar.ToSampleStep());
            }
        }