2 writes to Document
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\CodeGenerationTests.cs (2)
882this.Document = Workspace.CurrentSolution.Projects.Single().Documents.Single(); 971this.Document = this.Result;
20 references to Document
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (20)
CodeGeneration\CodeGenerationTests.cs (20)
90var root = await testContext.Document.GetSyntaxRootAsync(); 91var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 94testContext.Result = testContext.Document.WithSyntaxRoot(newRoot); 315var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 318testContext.Result = testContext.Document.WithSyntaxRoot((await testContext.Document.GetSyntaxRootAsync()).ReplaceNode(oldSyntax, newSyntax)); 330var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 334testContext.Result = testContext.Document.WithSyntaxRoot((await testContext.Document.GetSyntaxRootAsync()).ReplaceNode(oldMemberSyntax, newMemberSyntax)); 555var codeGenerator = testContext.Document.GetRequiredLanguageService<ICodeGenerationService>(); 556var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 560testContext.Result = testContext.Document.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(oldNode, newNode)); 574var codeGenerator = testContext.Document.GetRequiredLanguageService<ICodeGenerationService>(); 575var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 579testContext.Result = testContext.Document.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(declarationNode, newNode)); 596var codeGenerator = testContext.Document.GetRequiredLanguageService<ICodeGenerationService>(); 597var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 631testContext.Result = testContext.Document.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(declarationNode, updatedDeclarationNode)); 885this.Service = Document.Project.Services.GetService<ICodeGenerationService>(); 976var simplified = Simplifier.ReduceAsync(this.Document, Simplifier.Annotation, simplifierOptions, CancellationToken.None).Result;