public void TryUpdateCountFromContent_SingleRightParenthesis_CountsCorrectly()
        {
            // Arrange
            var content = ")";
            var count   = 2;

            // Act
            var result = ImplicitExpressionEditHandler.TryUpdateCountFromContent(content, ref count);

            // Assert
            Assert.True(result);
            Assert.Equal(1, count);
        }
        public void TryUpdateCountFromContent_ExistingCountAndNonParenthesisContent_ReturnsTrue()
        {
            // Arrange
            var content = "'(abc)de)fg";
            var count   = 1;

            // Act
            var result = ImplicitExpressionEditHandler.TryUpdateCountFromContent(content, ref count);

            // Assert
            Assert.True(result);
            Assert.Equal(0, count);
        }
        public void TryUpdateCountFromContent_InvalidParenthesis_ReturnsFalse()
        {
            // Arrange
            var content = "'())))))";
            var count   = 4;

            // Act
            var result = ImplicitExpressionEditHandler.TryUpdateCountFromContent(content, ref count);

            // Assert
            Assert.False(result);
            Assert.Equal(4, count);
        }
        public void TryUpdateCountFromContent_CorrectCount_ReturnsTrue()
        {
            // Arrange
            var content = "\"(()(";
            var count   = 0;

            // Act
            var result = ImplicitExpressionEditHandler.TryUpdateCountFromContent(content, ref count);

            // Assert
            Assert.True(result);
            Assert.Equal(2, count);
        }