예제 #1
0
        public static void GetDescriptionReturnsDescriptionOfOutputDirective()
        {
            var    directive = new OutputDirective(new DirectiveBlockStart(0), new DirectiveName(4, "output"), new Attribute[0], new BlockEnd(24));
            string description;
            Span   applicableTo;

            Assert.True(directive.TryGetDescription(4, out description, out applicableTo));
            Assert.Contains("extension", description, StringComparison.OrdinalIgnoreCase);
            Assert.Contains("encoding", description, StringComparison.OrdinalIgnoreCase);
        }
예제 #2
0
        public static void GetDescriptionReturnsDescriptionOfExtensionAttribute()
        {
            var directive = new OutputDirective(
                new DirectiveBlockStart(0),
                new DirectiveName(4, "output"),
                new[] { new Attribute(new AttributeName(14, "extension"), new Equals(18), new DoubleQuote(19), new AttributeValue(20, ".txt"), new DoubleQuote(22)) },
                new BlockEnd(24));
            string description;
            Span   applicableTo;

            Assert.True(directive.TryGetDescription(14, out description, out applicableTo));
            Assert.Contains("Extension of the output file", description, StringComparison.OrdinalIgnoreCase);
        }
예제 #3
0
 public static void GetDescriptionReturnsDescriptionOfEncodingAttribute()
 {
     var directive = new OutputDirective(
         new DirectiveBlockStart(0),
         new DirectiveName(4, "output"),
         new[] { new Attribute(new AttributeName(14, "encoding"), new Equals(18), new DoubleQuote(19), new AttributeValue(20, "utf-8"), new DoubleQuote(22)) },
         new BlockEnd(24));
     string description;
     Span applicableTo;
     Assert.True(directive.TryGetDescription(14, out description, out applicableTo));
     Assert.Contains("Encoding of the output file", description, StringComparison.OrdinalIgnoreCase);
 }
예제 #4
0
 public static void GetDescriptionReturnsDescriptionOfOutputDirective()
 {
     var directive = new OutputDirective(new DirectiveBlockStart(0), new DirectiveName(4, "output"), new Attribute[0], new BlockEnd(24));
     string description;
     Span applicableTo;
     Assert.True(directive.TryGetDescription(4, out description, out applicableTo));
     Assert.Contains("extension", description, StringComparison.OrdinalIgnoreCase);
     Assert.Contains("encoding", description, StringComparison.OrdinalIgnoreCase);
 }