public void AtDirectiveCompletionPoint_ReturnsFalseIfSyntaxTreeNull()
        {
            // Act
            var result = DirectiveCompletionItemProvider.AtDirectiveCompletionPoint(syntaxTree: null, location: new SourceSpan(0, 0));

            // Assert
            Assert.False(result);
        }
        public void AtDirectiveCompletionPoint_ReturnsTrueForSimpleImplicitExpressions()
        {
            // Arrange
            var syntaxTree = CreateSyntaxTree("@mod");
            var location   = new SourceSpan(2, 0);

            // Act
            var result = DirectiveCompletionItemProvider.AtDirectiveCompletionPoint(syntaxTree, location);

            // Assert
            Assert.True(result);
        }
        public void AtDirectiveCompletionPoint_ReturnsFalseWhenInsideDirective()
        {
            // Arrange
            var syntaxTree = CreateSyntaxTree("@functions { @  }", FunctionsDirective.Directive);
            var location   = new SourceSpan(14, 0);

            // Act
            var result = DirectiveCompletionItemProvider.AtDirectiveCompletionPoint(syntaxTree, location);

            // Assert
            Assert.False(result);
        }
        public void AtDirectiveCompletionPoint_ReturnsFalseWhenInsideAttributeArea()
        {
            // Arrange
            var syntaxTree = CreateSyntaxTree("<p @ >");
            var location   = new SourceSpan(4, 0);

            // Act
            var result = DirectiveCompletionItemProvider.AtDirectiveCompletionPoint(syntaxTree, location);

            // Assert
            Assert.False(result);
        }
        public void AtDirectiveCompletionPoint_ReturnsFalseWhenOwnerIsExplicitExpression()
        {
            // Arrange
            var syntaxTree = CreateSyntaxTree("@(something)");
            var location   = new SourceSpan(4, 0);

            // Act
            var result = DirectiveCompletionItemProvider.AtDirectiveCompletionPoint(syntaxTree, location);

            // Assert
            Assert.False(result);
        }
        public void AtDirectiveCompletionPoint_ReturnsFalseIfNoOwner()
        {
            // Arrange
            var syntaxTree = CreateSyntaxTree("@");
            var location   = new SourceSpan(2, 0);

            // Act
            var result = DirectiveCompletionItemProvider.AtDirectiveCompletionPoint(syntaxTree, location);

            // Assert
            Assert.False(result);
        }