12 references to WithDocumentText
Microsoft.CodeAnalysis.EditorFeatures (2)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
SolutionTests\SolutionTests.cs (7)
398var newSolution1 = solution.WithDocumentText([documentId], text, PreservationMode.PreserveIdentity);
402var newSolution2 = newSolution1.WithDocumentText([documentId], text, PreservationMode.PreserveIdentity);
406Assert.Same(solution, solution.WithDocumentText([null!], text));
407Assert.Same(solution, solution.WithDocumentText([s_unrelatedDocumentId], text));
409Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText((DocumentId[])null!, text, PreservationMode.PreserveIdentity));
410Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText([documentId], null!, PreservationMode.PreserveIdentity));
411Assert.Throws<ArgumentOutOfRangeException>(() => solution.WithDocumentText([documentId], text, (PreservationMode)(-1)));