private async Task AssertPosition(string fileContent, NavigateDirection navigateDirection)
        {
            var fileContentNoPercentMarker = TestHelpers.RemovePercentMarker(fileContent);
            var workspace = TestHelpers.CreateSimpleWorkspace(fileContentNoPercentMarker, "test.cs");
            var response  = await SendRequest(workspace, "test.cs", fileContentNoPercentMarker, navigateDirection);

            var finalCursorLineColumn = TestHelpers.GetLineAndColumnFromPercent(TestHelpers.RemoveDollarMarker(fileContent));

            Assert.Equal(finalCursorLineColumn.Line, response.Line);
            Assert.Equal(finalCursorLineColumn.Column, response.Column);
        }
        private async Task <NavigateResponse> SendRequest(OmnisharpWorkspace workspace, string fileName, string fileContent, NavigateDirection upOrDown)
        {
            var initialCursorLineColumn   = TestHelpers.GetLineAndColumnFromDollar(TestHelpers.RemovePercentMarker(fileContent));
            var fileContentNoDollarMarker = TestHelpers.RemoveDollarMarker(fileContent);
            var controller = new OmnisharpController(workspace, new FakeOmniSharpOptions());
            var request    = new Request
            {
                Line     = initialCursorLineColumn.Line,
                Column   = initialCursorLineColumn.Column,
                FileName = fileName,
                Buffer   = fileContentNoDollarMarker
            };

            if (upOrDown == NavigateDirection.UP)
            {
                return(await controller.NavigateUp(request));
            }
            else
            {
                return(await controller.NavigateDown(request));
            }
        }
        public async Task FixUsings_ReturnsAmbiguousResult()
        {
            const string fileContents              = @"
namespace nsA
{
    public class classX{}
}

namespace nsB
{
    public class classX{}
}

namespace OmniSharp
{
    public class class1 
    {
        public method1()
        {
            var c1 = new $classX();
        }
    }
}";
            var          classLineColumn           = TestHelpers.GetLineAndColumnFromDollar(TestHelpers.RemovePercentMarker(fileContents));
            var          fileContentNoDollarMarker = TestHelpers.RemoveDollarMarker(fileContents);
            var          expectedUnresolved        = new List <QuickFix>();

            expectedUnresolved.Add(new QuickFix()
            {
                Line     = classLineColumn.Line,
                Column   = classLineColumn.Column,
                FileName = fileName,
                Text     = "`classX` is ambiguous"
            });
            await AssertUnresolvedReferences(fileContentNoDollarMarker, expectedUnresolved);
        }