public void NonexistentGlobalCommentIsNotFound()
        {
            var file = GetFileFromMethod(MethodBase.GetCurrentMethod(), FileName);
            EditorConfigFile editorConfigFile = new EditorConfigFile(file);

            editorConfigFile.TryGetComment("Not a real comment", editorConfigFile.Global, out var comment).Should().BeFalse();

            comment.Should().BeNull();
        }
        public void ExistingGlobalCommentIsFound()
        {
            var file = GetFileFromMethod(MethodBase.GetCurrentMethod(), FileName);
            EditorConfigFile editorConfigFile = new EditorConfigFile(file);

            editorConfigFile.TryGetComment(GlobalCommentText, editorConfigFile.Global, out var comment).Should().BeTrue();

            comment !.Data.Text.Should().Be(GlobalCommentText);
            comment.LineNumber.Should().Be(3);
        }
        public void ExistingSectionCommentIsFound()
        {
            var file = GetFileFromMethod(MethodBase.GetCurrentMethod(), FileName);
            EditorConfigFile editorConfigFile = new EditorConfigFile(file);

            var section = editorConfigFile.Sections[0];

            editorConfigFile.TryGetComment(SectionCommentText, section, out var comment).Should().BeTrue();

            comment !.Data.Text.Should().Be(SectionCommentText);
            comment.LineNumber.Should().Be(7);
        }