public void TryGetProjectPath_NullHostProjectPath_ReturnsFalse()
        {
            // Arrange
            var textBuffer          = Mock.Of <ITextBuffer>();
            var textDocument        = Mock.Of <ITextDocument>();
            var textDocumentFactory = Mock.Of <ITextDocumentFactoryService>(factory => factory.TryGetTextDocument(textBuffer, out textDocument) == true);
            var projectPathProvider = new TestGuestProjectPathProvider(
                null,
                JoinableTaskContext,
                textDocumentFactory,
                Mock.Of <ProxyAccessor>(),
                SessionAccessor);

            // Act
            var result = projectPathProvider.TryGetProjectPath(textBuffer, out var filePath);

            // Assert
            Assert.False(result);
            Assert.Null(filePath);
        }
        public void TryGetProjectPath_ValidHostProjectPath_ReturnsTrueWithGuestNormalizedPath()
        {
            // Arrange
            var textBuffer          = Mock.Of <ITextBuffer>();
            var textDocument        = Mock.Of <ITextDocument>();
            var textDocumentFactory = Mock.Of <ITextDocumentFactoryService>(factory => factory.TryGetTextDocument(textBuffer, out textDocument) == true);
            var expectedProjectPath = "/guest/path/project.csproj";
            var projectPathProvider = new TestGuestProjectPathProvider(
                new Uri("vsls:/path/project.csproj"),
                JoinableTaskContext,
                textDocumentFactory,
                Mock.Of <ProxyAccessor>(),
                SessionAccessor);

            // Act
            var result = projectPathProvider.TryGetProjectPath(textBuffer, out var filePath);

            // Assert
            Assert.True(result);
            Assert.Equal(expectedProjectPath, filePath);
        }
        public void TryGetProjectPath_GuestSessionNotActive_ReturnsFalse()
        {
            // Arrange
            var sessionAccessor     = Mock.Of <LiveShareSessionAccessor>(accessor => accessor.IsGuestSessionActive == false);
            var textBuffer          = Mock.Of <ITextBuffer>();
            var textDocument        = Mock.Of <ITextDocument>();
            var textDocumentFactory = Mock.Of <ITextDocumentFactoryService>(factory => factory.TryGetTextDocument(textBuffer, out textDocument) == true);
            var projectPathProvider = new TestGuestProjectPathProvider(
                new Uri("vsls:/path/project.csproj"),
                JoinableTaskContext,
                textDocumentFactory,
                Mock.Of <ProxyAccessor>(),
                sessionAccessor);

            // Act
            var result = projectPathProvider.TryGetProjectPath(textBuffer, out var filePath);

            // Assert
            Assert.False(result);
            Assert.Null(filePath);
        }