예제 #1
0
        public static void AcceptCallsVisitClassBlockStartMethodOfSyntaxNodeVisitor()
        {
            var visitor = Substitute.For <SyntaxNodeVisitor>();
            var node    = new ClassBlockStart(default(int));

            node.Accept(visitor);
            visitor.Received().VisitClassBlockStart(node);
        }
예제 #2
0
        public static void VisitClassBlockStartCallsVisitCodeBlockStartToAllowProcessingAllCodeBlockStartsPolymorphically()
        {
            var visitor         = Substitute.ForPartsOf <SyntaxNodeVisitor>();
            var classBlockStart = new ClassBlockStart(0);

            visitor.VisitClassBlockStart(classBlockStart);
            visitor.Received().VisitCodeBlockStart(classBlockStart);
            Assert.Equal(typeof(CodeBlockStart), typeof(ClassBlockStart).BaseType);
        }
예제 #3
0
        public static void GetDescriptionReturnsDescriptionOfClassCodeBlocks()
        {
            var    target = new ClassBlockStart(0);
            string description;
            Span   applicableTo;

            Assert.True(target.TryGetDescription(0, out description, out applicableTo));
            Assert.Contains("class feature", description, StringComparison.OrdinalIgnoreCase);
            Assert.Equal(target.Span, applicableTo);
        }
예제 #4
0
 protected internal virtual void VisitClassBlockStart(ClassBlockStart node)
 {
     this.VisitCodeBlockStart(node);
 }