public static void ValidateReturnsErrorsFromMultipleChildren()
 {
     var child1 = new TestableNonterminalNode { ValidationErrors = new[] { new TemplateError(string.Empty, default(Span), default(Position)) } };
     var child2 = new TestableNonterminalNode { ValidationErrors = new[] { new TemplateError(string.Empty, default(Span), default(Position)) } };
     var parent = new TestableNonterminalNode(child1, child2);
     Assert.Equal(2, parent.Validate().Count());
 }
 public static void ValidateReturnsMultipleErrorsFromSingleChild()
 {
     var child = new TestableNonterminalNode();
     child.ValidationErrors = new[]
     {
         new TemplateError(string.Empty, default(Span), default(Position)), 
         new TemplateError(string.Empty, default(Span), default(Position))
     };
     var parent = new TestableNonterminalNode(child);
     Assert.Equal(2, parent.Validate().Count());
 }
Exemple #3
0
        public static void ValidateReturnsErrorsFromMultipleChildren()
        {
            var child1 = new TestableNonterminalNode {
                ValidationErrors = new[] { new TemplateError(string.Empty, default(Span), default(Position)) }
            };
            var child2 = new TestableNonterminalNode {
                ValidationErrors = new[] { new TemplateError(string.Empty, default(Span), default(Position)) }
            };
            var parent = new TestableNonterminalNode(child1, child2);

            Assert.Equal(2, parent.Validate().Count());
        }
Exemple #4
0
        public static void ValidateReturnsMultipleErrorsFromSingleChild()
        {
            var child = new TestableNonterminalNode();

            child.ValidationErrors = new[]
            {
                new TemplateError(string.Empty, default(Span), default(Position)),
                new TemplateError(string.Empty, default(Span), default(Position))
            };
            var parent = new TestableNonterminalNode(child);

            Assert.Equal(2, parent.Validate().Count());
        }