2 writes to Document
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\CodeGenerationTests.cs (2)
865
this.
Document
= Workspace.CurrentSolution.Projects.Single().Documents.Single();
954
this.
Document
= this.Result;
20 references to Document
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (20)
CodeGeneration\CodeGenerationTests.cs (20)
91
var root = await testContext.
Document
.GetSyntaxRootAsync();
92
var options = await testContext.
Document
.GetCodeGenerationOptionsAsync(CancellationToken.None);
95
testContext.Result = testContext.
Document
.WithSyntaxRoot(newRoot);
313
var options = await testContext.
Document
.GetCodeGenerationOptionsAsync(CancellationToken.None);
316
testContext.Result = testContext.
Document
.WithSyntaxRoot((await testContext.
Document
.GetSyntaxRootAsync()).ReplaceNode(oldSyntax, newSyntax));
328
var options = await testContext.
Document
.GetCodeGenerationOptionsAsync(CancellationToken.None);
332
testContext.Result = testContext.
Document
.WithSyntaxRoot((await testContext.
Document
.GetSyntaxRootAsync()).ReplaceNode(oldMemberSyntax, newMemberSyntax));
538
var codeGenerator = testContext.
Document
.GetRequiredLanguageService<ICodeGenerationService>();
539
var options = await testContext.
Document
.GetCodeGenerationOptionsAsync(CancellationToken.None);
543
testContext.Result = testContext.
Document
.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(oldNode, newNode));
557
var codeGenerator = testContext.
Document
.GetRequiredLanguageService<ICodeGenerationService>();
558
var options = await testContext.
Document
.GetCodeGenerationOptionsAsync(CancellationToken.None);
562
testContext.Result = testContext.
Document
.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(declarationNode, newNode));
579
var codeGenerator = testContext.
Document
.GetRequiredLanguageService<ICodeGenerationService>();
580
var options = await testContext.
Document
.GetCodeGenerationOptionsAsync(CancellationToken.None);
614
testContext.Result = testContext.
Document
.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(declarationNode, updatedDeclarationNode));
868
this.Service =
Document
.Project.Services.GetService<ICodeGenerationService>();
959
var simplified = Simplifier.ReduceAsync(this.
Document
, Simplifier.Annotation, simplifierOptions, CancellationToken.None).Result;