public static void AcceptCallsVisitClassBlockStartMethodOfSyntaxNodeVisitor() { var visitor = Substitute.For <SyntaxNodeVisitor>(); var node = new ClassBlockStart(default(int)); node.Accept(visitor); visitor.Received().VisitClassBlockStart(node); }
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); }
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); }
protected internal virtual void VisitClassBlockStart(ClassBlockStart node) { this.VisitCodeBlockStart(node); }