示例#1
0
 public static void AcceptCallsVisitEqualsMethodOfSyntaxNodeVisitor()
 {
     var visitor = Substitute.For<SyntaxNodeVisitor>();
     var node = new Equals(default(int));
     node.Accept(visitor);
     visitor.Received().VisitEquals(node);
 }
示例#2
0
        public static void AcceptCallsVisitEqualsMethodOfSyntaxNodeVisitor()
        {
            var visitor = Substitute.For <SyntaxNodeVisitor>();
            var node    = new Equals(default(int));

            node.Accept(visitor);
            visitor.Received().VisitEquals(node);
        }
示例#3
0
        public static void VisitEqualsCallsVisitSyntaxTokenToAllowProcessingAllSyntaxTokensPolymorphically()
        {
            var visitor = Substitute.ForPartsOf <SyntaxNodeVisitor>();
            var equals  = new Equals(0);

            visitor.VisitEquals(equals);
            visitor.Received().VisitSyntaxToken(equals);
            Assert.Equal(typeof(SyntaxToken), typeof(Equals).BaseType);
        }
示例#4
0
 public static void ChildNodesReturnsNodesSpecifiedInConstructor()
 {
     var name = new AttributeName(0, "language");
     var equals = new Equals(8);
     var quote1 = new DoubleQuote(9);
     var value = new AttributeValue(10, "C#");
     var quote2 = new DoubleQuote(12);
     var attribute = new Attribute(name, equals, quote1, value, quote2);
     Assert.True(new SyntaxNode[] { name, equals, quote1, value, quote2 }.SequenceEqual(attribute.ChildNodes()));
 }
示例#5
0
        public static void ChildNodesReturnsNodesSpecifiedInConstructor()
        {
            var name      = new AttributeName(0, "language");
            var equals    = new Equals(8);
            var quote1    = new DoubleQuote(9);
            var value     = new AttributeValue(10, "C#");
            var quote2    = new DoubleQuote(12);
            var attribute = new Attribute(name, equals, quote1, value, quote2);

            Assert.True(new SyntaxNode[] { name, equals, quote1, value, quote2 }.SequenceEqual(attribute.ChildNodes()));
        }
示例#6
0
        public Attribute(AttributeName name, Equals equals, DoubleQuote quote1, AttributeValue value, DoubleQuote quote2)
        {
            Debug.Assert(name != null, "name");
            Debug.Assert(equals != null, "equals");
            Debug.Assert(quote1 != null, "quote1");
            Debug.Assert(value != null, "value");
            Debug.Assert(quote2 != null, "quote2");

            this.name   = name;
            this.equals = equals;
            this.quote1 = quote1;
            this.value  = value;
            this.quote2 = quote2;
        }
示例#7
0
        public Attribute(AttributeName name, Equals equals, DoubleQuote quote1, AttributeValue value, DoubleQuote quote2)
        {
            Debug.Assert(name != null, "name");
            Debug.Assert(equals != null, "equals");
            Debug.Assert(quote1 != null, "quote1");
            Debug.Assert(value != null, "value");
            Debug.Assert(quote2 != null, "quote2");

            this.name = name;
            this.equals = equals;
            this.quote1 = quote1;
            this.value = value;
            this.quote2 = quote2;
        }
 public static void VisitEqualsCallsVisitSyntaxTokenToAllowProcessingAllSyntaxTokensPolymorphically()
 {
     var visitor = Substitute.ForPartsOf<SyntaxNodeVisitor>();
     var equals = new Equals(0);
     visitor.VisitEquals(equals);
     visitor.Received().VisitSyntaxToken(equals);
     Assert.Equal(typeof(SyntaxToken), typeof(Equals).BaseType);
 }
示例#9
0
 protected internal virtual void VisitEquals(Equals node)
 {
     this.VisitSyntaxToken(node);
 }
示例#10
0
 protected internal virtual void VisitEquals(Equals node)
 {
     this.VisitSyntaxToken(node);
 }