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