public void DocumentManager_Changed_Removed_Noops()
        {
            // Arrange
            var lspDocumentMappingProvider = new Mock <LSPDocumentMappingProvider>(MockBehavior.Strict);
            var fileInfoProvider           = new Mock <RazorDynamicFileInfoProvider>(MockBehavior.Strict);
            var publisher = new CSharpVirtualDocumentPublisher(fileInfoProvider.Object, lspDocumentMappingProvider.Object);

            // Act & Assert
            publisher.Changed(old: Mock.Of <LSPDocumentSnapshot>(MockBehavior.Strict), @new: null, virtualOld: null, virtualNew: null, LSPDocumentChangeKind.Removed);
        }
        public void DocumentManager_Changed_Removed_Noops()
        {
            // Arrange
            var fileInfoProvider = new Mock <RazorDynamicFileInfoProvider>(MockBehavior.Strict);
            var publisher        = new CSharpVirtualDocumentPublisher(fileInfoProvider.Object);
            var args             = new LSPDocumentChangeEventArgs(old: Mock.Of <LSPDocumentSnapshot>(), @new: null, LSPDocumentChangeKind.Removed);

            // Act & Assert
            publisher.DocumentManager_Changed(sender: null, args);
        }
        public void DocumentManager_Changed_VirtualDocumentChanged_UpdatesFileInfo()
        {
            // Arrange
            var csharpSnapshot   = new CSharpVirtualDocumentSnapshot(new Uri("C:/path/to/something.razor.g.cs"), Mock.Of <ITextSnapshot>(), hostDocumentSyncVersion: 1337);
            var lspDocument      = new TestLSPDocumentSnapshot(new Uri("C:/path/to/something.razor"), 1337, csharpSnapshot);
            var fileInfoProvider = new Mock <RazorDynamicFileInfoProvider>(MockBehavior.Strict);

            fileInfoProvider.Setup(provider => provider.UpdateLSPFileInfo(lspDocument.Uri, It.IsAny <DynamicDocumentContainer>()))
            .Verifiable();
            var publisher = new CSharpVirtualDocumentPublisher(fileInfoProvider.Object);
            var args      = new LSPDocumentChangeEventArgs(
                old: Mock.Of <LSPDocumentSnapshot>(), @new: lspDocument,
                virtualOld: Mock.Of <VirtualDocumentSnapshot>(), virtualNew: csharpSnapshot,
                LSPDocumentChangeKind.VirtualDocumentChanged);

            // Act
            publisher.DocumentManager_Changed(sender: null, args);

            // Assert
            fileInfoProvider.VerifyAll();
        }