67 references to AddDocument
Microsoft.AspNetCore.Http.Extensions.Tests (11)
RequestDelegateGenerator\CompileTimeCreationTests.cs (10)
56project = project.AddDocument("TestMapActions.cs", SourceText.From(source, Encoding.UTF8)).Project; 57project = project.AddDocument("OtherTestMapActions.cs", SourceText.From(otherSource, Encoding.UTF8)).Project; 82project = project.AddDocument("TestMapActions.cs", SourceText.From(source, Encoding.UTF8)).Project; 83project = project.AddDocument("OtherTestMapActions.cs", SourceText.From(otherSource, Encoding.UTF8)).Project; 165project = project.AddDocument("TestMapActions.cs", SourceText.From(source, Encoding.UTF8), filePath: Path.Combine(currentDirectory, "TestMapActions.cs")).Project; 232project = project.AddDocument("TestMapActions.cs", SourceText.From(source, Encoding.UTF8)).Project; 286project = project.AddDocument("TestMapActions.cs", SourceText.From(source, Encoding.UTF8)).Project; 333project = project.AddDocument("TestMapActions.cs", SourceText.From(source, Encoding.UTF8)).Project; 669project = project.AddDocument("TestMapActions.cs", SourceText.From(source, Encoding.UTF8)).Project; 726project = project.AddDocument("TestMapActions.cs", SourceText.From(source, Encoding.UTF8)).Project;
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
306var project = _baseProject.AddDocument("TestMapActions.cs", SourceText.From(source, Encoding.UTF8)).Project;
Microsoft.AspNetCore.Http.Microbenchmarks (2)
RequestDelegateGeneratorBenchmarks.cs (1)
32project = project.AddDocument("TestMapActions.cs", SourceText.From(source, Encoding.UTF8)).Project;
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
306var project = _baseProject.AddDocument("TestMapActions.cs", SourceText.From(source, Encoding.UTF8)).Project;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Completion\CompletionServiceTests.cs (2)
53.AddDocument("TestDocument.cs", text); 111.AddDocument("TestDocument.cs", text);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
45AddDocument("test.cs", SourceText.From(source, Encoding.UTF8), filePath: Path.Combine(TempRoot.Root, "test.cs")).Project.Solution;
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
Formatting\FormattingMultipleSpanTests.cs (1)
165var document = project.AddDocument("Document", SourceText.From(""));
Formatting\FormattingTreeEditTests.cs (1)
25return project.AddDocument("code", SourceText.From(code));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
176var document = project.AddDocument("test.cs", SourceText.From("class A {}"), filePath: "z:\\test.cs");
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Simplification\ParameterSimplificationTests.vb (1)
24.AddDocument("Document", SourceText.From(input))
Microsoft.CodeAnalysis.Features.UnitTests (5)
EditAndContinue\ActiveStatementsMapTests.cs (3)
118.AddDocument("doc", SourceText.From(source, Encoding.UTF8), filePath: "a.cs").Project.Solution; 173.AddDocument("doc", SourceText.From(source, Encoding.UTF8), filePath: "a.cs").Project.Solution; 224.AddDocument("doc", SourceText.From(source, Encoding.UTF8), filePath: "a.cs").Project.Solution;
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
570AddDocument("a.cs", CreateText(source1), filePath: sourceFile.Path);
EditAndContinue\EmitSolutionUpdateResultsTests.cs (1)
73AddDocument(sourcePath, SourceText.From("class C {}", Encoding.UTF8), filePath: Path.Combine(TempRoot.Root, sourcePath));
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (3)
CaseCorrection\VisualBasicCaseCorrectionTestBase.vb (1)
17Dim document = project.AddDocument("Document", SourceText.From(code))
Formatting\FormattingTests.vb (1)
3016Dim document = project.AddDocument("Document", SourceText.From(inputOutput))
Formatting\VisualBasicFormattingTestBase.vb (1)
58Dim document = project.AddDocument("Document", SourceText.From(code))
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Formatting\FormattingTestBase.cs (1)
49var document = project.AddDocument("Document", SourceText.From(code));
Microsoft.CodeAnalysis.Workspaces.UnitTests (29)
CodeCleanup\AddMissingTokensTests.cs (1)
2733.AddDocument("Document", SourceText.From(code));
CodeCleanup\CodeCleanupTests.cs (1)
420return project.AddDocument("Document", SourceText.From(code));
CodeCleanup\FixIncorrectTokenTests.cs (1)
758.AddDocument("Document", SourceText.From(code));
CodeCleanup\NormalizeModifiersOrOperatorsTests.cs (1)
1033return project.AddDocument("Document", SourceText.From(code));
CodeCleanup\ReduceTokenTests.cs (1)
2021.AddDocument("Document", SourceText.From(code));
SemanticModelReuse\SemanticModelReuseTests.cs (1)
30.AddDocument("Document", SourceText.From(code));
SolutionTests\SolutionTests.cs (21)
4074project = project.AddDocument("Extra.cs", SourceText.From("class Extra { }")).Project; 4076var documentToFreeze = project.AddDocument("DocumentToFreeze.cs", SourceText.From("")); 4099project = project.AddDocument("Extra.cs", SourceText.From("class Extra { }")).Project; 4101var documentToFreeze = project.AddDocument("DocumentToFreeze.cs", SourceText.From("")); 4127project = project.AddDocument("Extra.cs", SourceText.From("class Extra { }")).Project; 4129var documentToFreezeOriginal = project.AddDocument("DocumentToFreeze.cs", SourceText.From("class DocumentToFreeze { void M() { } }")); 4172project = project.AddDocument("Extra.cs", SourceText.From("class Extra { }")).Project; 4174var documentToFreezeOriginal = project.AddDocument("DocumentToFreeze.cs", SourceText.From("class DocumentToFreeze { void M() { } }")); 5578project = project.AddDocument("Extra.cs", SourceText.From("class Extra { }")).Project; 5595project = project.AddDocument("Extra.cs", SourceText.From("class Extra { }")).Project; 5616project1 = project2.Solution.GetProject(project1.Id).AddDocument("Doc1", SourceText.From("class Doc1 { }")).Project; 5617project2 = project1.Solution.GetProject(project2.Id).AddDocument("Doc2", SourceText.From("class Doc2 { }")).Project; 5644project1 = project2.Solution.GetProject(project1.Id).AddDocument("Doc1", SourceText.From("class Doc1 { }")).Project; 5645project2 = project1.Solution.GetProject(project2.Id).AddDocument("Doc2", SourceText.From("class Doc2 { }")).Project; 5674project1 = project2.Solution.GetProject(project1.Id).AddDocument("Doc1", SourceText.From("class Doc1 { }")).Project; 5675project2 = project1.Solution.GetProject(project2.Id).AddDocument("Doc2", SourceText.From("class Doc2 { }")).Project; 5706project1 = project1.AddDocument("Doc1", SourceText.From("class Doc1 { }")).Project; 5734project1 = project1.AddDocument("Doc1", SourceText.From("class Doc1 { }")).Project; 5783project = project.AddDocument("Extra.ts", SourceText.From("class Extra { }")).Project; 5806.AddDocument($"Document", SourceText.From("class C { }"), filePath: @"c:\test\Document.cs").Project; 5816.AddDocument($"Document", SourceText.From("class C { }"), filePath: @"c:\test\Document.cs").Project;
SolutionTests\SolutionWithSourceGeneratorTests.cs (2)
230project = project.AddDocument("Source.cs", SourceText.From("")).Project; 816.AddDocument(originalDocument1.Name, await originalDocument1.GetTextAsync().ConfigureAwait(false), filePath: originalDocument1.FilePath);
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\VisualStudioWorkspaceImpl.AddDocumentUndoUnit.cs (1)
23=> fromProject.AddDocument(DocumentInfo.Name, Text, DocumentInfo.Folders, DocumentInfo.FilePath).Project;
Roslyn.VisualStudio.Next.UnitTests (8)
Remote\SnapshotSerializationTests.cs (2)
50var document1 = project1.AddDocument("Document1", SourceText.From(csCode)); 54var document2 = project2.AddDocument("Document2", SourceText.From(vbCode));
Services\ServiceHubServicesTests.cs (1)
1737solution = current.AddDocument($"Document{i}", SourceText.From(documents[i])).Project.Solution;
Services\SolutionServiceTests.cs (5)
315project = project.AddDocument("newDocument", SourceText.From("// new text")).Project; 835solution = solution.GetProject(project1.Id).AddDocument("X.cs", SourceText.From("// X")).Project.Solution; 836solution = solution.GetProject(project2.Id).AddDocument("Y.vb", SourceText.From("' Y")).Project.Solution; 890solution = solution.GetProject(project1.Id).AddDocument("X.cs", SourceText.From("// X")).Project.Solution; 891solution = solution.GetProject(project2.Id).AddDocument("Y.cs", SourceText.From("// Y")).Project.Solution;