11 references to WithDocumentText
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
SolutionTests\SolutionTests.cs (7)
412var newSolution1 = solution.WithDocumentText([documentId], text, PreservationMode.PreserveIdentity);
416var newSolution2 = newSolution1.WithDocumentText([documentId], text, PreservationMode.PreserveIdentity);
420Assert.Same(solution, solution.WithDocumentText([null!], text));
421Assert.Same(solution, solution.WithDocumentText([s_unrelatedDocumentId], text));
423Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText((DocumentId[])null!, text, PreservationMode.PreserveIdentity));
424Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText([documentId], null!, PreservationMode.PreserveIdentity));
425Assert.Throws<ArgumentOutOfRangeException>(() => solution.WithDocumentText([documentId], text, (PreservationMode)(-1)));