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