2 writes to Document
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\CodeGenerationTests.cs (2)
883this.Document = Workspace.CurrentSolution.Projects.Single().Documents.Single(); 972this.Document = this.Result;
20 references to Document
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (20)
CodeGeneration\CodeGenerationTests.cs (20)
91var root = await testContext.Document.GetSyntaxRootAsync(); 92var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 95testContext.Result = testContext.Document.WithSyntaxRoot(newRoot); 316var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 319testContext.Result = testContext.Document.WithSyntaxRoot((await testContext.Document.GetSyntaxRootAsync()).ReplaceNode(oldSyntax, newSyntax)); 331var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 335testContext.Result = testContext.Document.WithSyntaxRoot((await testContext.Document.GetSyntaxRootAsync()).ReplaceNode(oldMemberSyntax, newMemberSyntax)); 556var codeGenerator = testContext.Document.GetRequiredLanguageService<ICodeGenerationService>(); 557var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 561testContext.Result = testContext.Document.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(oldNode, newNode)); 575var codeGenerator = testContext.Document.GetRequiredLanguageService<ICodeGenerationService>(); 576var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 580testContext.Result = testContext.Document.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(declarationNode, newNode)); 597var codeGenerator = testContext.Document.GetRequiredLanguageService<ICodeGenerationService>(); 598var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 632testContext.Result = testContext.Document.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(declarationNode, updatedDeclarationNode)); 886this.Service = Document.Project.Services.GetService<ICodeGenerationService>(); 977var simplified = Simplifier.ReduceAsync(this.Document, Simplifier.Annotation, simplifierOptions, CancellationToken.None).Result;