public static void GetDescriptionReturnsDescriptionOfTheDirective()
 {
     var directive = new AssemblyDirective(new DirectiveBlockStart(0), new DirectiveName(4, "assembly"), new Attribute[0], new BlockEnd(23));
     string description;
     Span applicableTo;
     Assert.True(directive.TryGetDescription(4, out description, out applicableTo));
     Assert.StartsWith("Loads an assembly", description, StringComparison.OrdinalIgnoreCase);
 }
        public static void GetDescriptionReturnsDescriptionOfTheDirective()
        {
            var    directive = new AssemblyDirective(new DirectiveBlockStart(0), new DirectiveName(4, "assembly"), new Attribute[0], new BlockEnd(23));
            string description;
            Span   applicableTo;

            Assert.True(directive.TryGetDescription(4, out description, out applicableTo));
            Assert.StartsWith("Loads an assembly", description, StringComparison.OrdinalIgnoreCase);
        }
 public static void GetDescriptionReturnsDescriptionOfTheNameAttribute()
 {
     var directive = new AssemblyDirective(
         new DirectiveBlockStart(0),
         new DirectiveName(4, "assembly"),
         new[] { new Attribute(new AttributeName(13, "name"), new Equals(17), new DoubleQuote(18), new AttributeValue(19, "42"), new DoubleQuote(21)) },
         new BlockEnd(23));
     string description;
     Span applicableTo;
     Assert.True(directive.TryGetDescription(13, out description, out applicableTo));
     Assert.StartsWith("Name of an assembly", description, StringComparison.OrdinalIgnoreCase);
 }
        public static void GetDescriptionReturnsDescriptionOfTheNameAttribute()
        {
            var directive = new AssemblyDirective(
                new DirectiveBlockStart(0),
                new DirectiveName(4, "assembly"),
                new[] { new Attribute(new AttributeName(13, "name"), new Equals(17), new DoubleQuote(18), new AttributeValue(19, "42"), new DoubleQuote(21)) },
                new BlockEnd(23));
            string description;
            Span   applicableTo;

            Assert.True(directive.TryGetDescription(13, out description, out applicableTo));
            Assert.StartsWith("Name of an assembly", description, StringComparison.OrdinalIgnoreCase);
        }