1 instantiation of TestWorkspace
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\TestWorkspace_Create.cs (1)
34var workspace = new TestWorkspace(composition, workspaceKind, ignoreUnchangeableDocumentsWhenApplyingChanges: ignoreUnchangeableDocumentsWhenApplyingChanges);
735 references to TestWorkspace
IdeBenchmarks (10)
FormatterBenchmarks.cs (4)
46using var workspace = TestWorkspace.CreateCSharp(text); 59using var workspace = TestWorkspace.CreateVisualBasic(text);
InheritanceMargin\InheritanceMarginGlyphBenchmarks.cs (2)
129using var workspace = TestWorkspace.CreateCSharp(testFile);
RegexClassifierBenchmarks.cs (2)
71using (var workspace = TestWorkspace.CreateCSharp(code, parseOptions))
SQLitePersistentStorageBenchmark.cs (2)
30private TestWorkspace _workspace; 55_workspace = TestWorkspace.Create(
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (7)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
2883using var workspace = CreateWorkspaceFromOptions(input, parameters);
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
1227using var workspace = CreateWorkspaceFromOptions(source, testParameters);
src\Analyzers\CSharp\Tests\SimplifyInterpolation\SimplifyInterpolationTests.cs (1)
34using var workspace = CreateWorkspaceFromOptions("""
src\Analyzers\CSharp\Tests\UpdateProjectToAllowUnsafe\UpdateProjectToAllowUnsafeTests.cs (1)
33using (var workspace = CreateWorkspaceFromOptions(initialMarkup, parameters))
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (2)
38using (var workspace = CreateWorkspaceFromOptions(initialMarkup, parameters)) 60using var workspace = CreateWorkspaceFromOptions(initialMarkup, parameters);
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzerTests.cs (1)
659using var workspace = CreateWorkspaceFromOptions(source, testParameters);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (13)
Completion\CompletionProviders\LoadDirectiveCompletionProviderTests.cs (1)
84using var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features);
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (1)
125using var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features);
Completion\CompletionServiceTests.cs (2)
48using var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features.AddParts(typeof(ThirdPartyCompletionProvider))); 105using var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features.AddParts(typeof(ThirdPartyCompletionProvider)));
Rename\CSharpInlineRenameServiceTests.cs (2)
62using var workspace = TestWorkspace.CreateCSharp(markup, composition: EditorTestCompositions.EditorFeatures);
StringIndentation\StringIndentationTests.cs (3)
26using var workspace = TestWorkspace.CreateWorkspace( 27TestWorkspace.CreateWorkspaceElement(LanguageNames.CSharp,
SymbolKey\SymbolKeyTests.cs (4)
193using var workspace = GetWorkspace(); 210TestWorkspace GetWorkspace() 236return TestWorkspace.CreateWorkspace(XElement.Parse($@" 245return TestWorkspace.CreateWorkspace(XElement.Parse($@"
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\RecommenderTests.cs (1)
58using var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (100)
AddAwait\AddAwaitTests.cs (1)
18protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
AddFileBanner\AddFileBannerTests.cs (1)
18protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertAnonymousType\ConvertAnonymousTypeToClassTests.cs (1)
22protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertAnonymousType\ConvertAnonymousTypeToTupleTests.cs (1)
20protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertAutoPropertyToFullProperty\ConvertAutoPropertyToFullPropertyTests.cs (5)
18protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters) 1223using var testWorkspace = TestWorkspace.Create(xmlString); 1270using var testWorkspace = TestWorkspace.Create(xmlString);
ConvertBetweenRegularAndVerbatimString\ConvertBetweenRegularAndVerbatimInterpolatedStringTests.cs (1)
19protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertBetweenRegularAndVerbatimString\ConvertBetweenRegularAndVerbatimStringTests.cs (1)
19protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertForEachToFor\ConvertForEachToForTests.cs (1)
24protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertForToForEach\ConvertForToForEachTests.cs (1)
22protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertIfToSwitch\ConvertIfToSwitchFixAllTests.cs (1)
17protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertLinq\ConvertForEachToLinqQueryTests.cs (1)
18protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertLinq\ConvertLinqQueryToForEachTests.cs (1)
20protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertLocalFunctionToMethod\ConvertLocalFunctionToMethodTests.cs (1)
19protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertNamespace\ConvertNamespaceRefactoringFixAllTests.cs (1)
19protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertNumericLiteral\ConvertNumericLiteralTests.cs (1)
20protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertToInterpolatedString\ConvertPlaceholderToInterpolatedStringTests.cs (1)
20protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertToInterpolatedString\ConvertRegularStringToInterpolatedStringTests.cs (1)
19protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertToRawString\ConvertInterpolatedStringToRawString_FixAllTests.cs (1)
18protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ConvertToRawString\ConvertRegularStringToRawString_FixAllTests.cs (1)
18protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1058using var workspace = CreateWorkspaceFromOptions(source, parameters);
Diagnostics\Suppression\SuppressionAllCodeTests.cs (2)
27protected override TestWorkspace CreateWorkspaceFromFile(string definition, ParseOptions parseOptions) 28=> TestWorkspace.CreateCSharp(definition, (CSharpParseOptions)parseOptions, composition: s_compositionWithMockDiagnosticUpdateSourceRegistrationService);
Diagnostics\Suppression\SuppressionTests.cs (3)
444using var workspace = CreateWorkspaceFromOptions(source, parameters); 756protected override async Task<(ImmutableArray<CodeAction>, CodeAction actionToInvoke)> GetCodeActionsAsync(TestWorkspace workspace, TestParameters parameters) 998protected override async Task<(ImmutableArray<CodeAction>, CodeAction actionToInvoke)> GetCodeActionsAsync(TestWorkspace workspace, TestParameters parameters)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (15)
36private static TestWorkspace CreateWorkspace() 300using var workspace = CreateWorkspace(); 367using var workspace = CreateWorkspace(); 394using var workspace = CreateWorkspace(); 428using var workspace = CreateWorkspace(); 459using var workspace = CreateWorkspace(); 508using var workspace = TestWorkspace.CreateCSharp( 541using var workspace = CreateWorkspace(); 579using var workspace = CreateWorkspace(); 618using var workspace = CreateWorkspace(); 659using var workspace = CreateWorkspace(); 706using var workspace = CreateWorkspace(); 740using var workspace = CreateWorkspace(); 794using var workspace = CreateWorkspace();
EnableNullable\EnableNullableFixAllTests.cs (1)
16protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
EncapsulateField\EncapsulateFieldTests.cs (1)
24protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ExtractClass\ExtractClassTests.cs (1)
52return Task.FromResult<Workspace>(TestWorkspace.Create(WorkspaceKind, LanguageNames.CSharp, unusedCompilationOptions, unusedParseOptions));
ExtractMethod\ExtractLocalFunctionTests.cs (1)
22protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ExtractMethod\ExtractMethodTests2.cs (1)
23protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
GenerateOverrides\GenerateOverridesTests.cs (1)
20protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
InlineTemporary\InlineTemporaryTests.cs (1)
20protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
IntroduceParameter\IntroduceParameterTests.cs (1)
22protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
IntroduceUsingStatement\IntroduceUsingStatementTests.cs (1)
19protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
IntroduceVariable\InteractiveIntroduceVariableTests.cs (1)
20protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
IntroduceVariable\IntroduceLocalForExpressionTests.cs (1)
56protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
IntroduceVariable\IntroduceVariableTests.cs (1)
25protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
InvertConditional\InvertConditionalTests.cs (1)
20protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
InvertLogical\InvertLogicalTests.cs (1)
23protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
MakeLocalFunctionStatic\MakeLocalFunctionStaticRefactoringTests.cs (1)
19protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
MoveDeclarationNearReference\MoveDeclarationNearReferenceTests.cs (1)
21protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
NameTupleElement\NameTupleElementTests.cs (1)
20protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ReplaceDocCommentTextWithTag\ReplaceDocCommentTextWithTagTests.cs (1)
18protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ReplaceMethodWithProperty\ReplaceMethodWithPropertyTests.cs (1)
20protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ReplacePropertyWithMethods\ReplacePropertyWithMethodsTests.cs (1)
23protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
ReverseForStatement\ReverseForStatementTests.cs (1)
19protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
SemanticSearch\CSharpSemanticSearchServiceTests.cs (8)
48using var workspace = TestWorkspace.Create(""" 89using var workspace = TestWorkspace.Create(""" 139using var workspace = TestWorkspace.Create(""" 193using var workspace = TestWorkspace.Create("""
SplitOrMergeIfStatements\MergeConsecutiveIfStatementsTests_ElseIf_WithPrevious.cs (1)
19protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
SplitOrMergeIfStatements\MergeNestedIfStatementsTests_WithOuter.cs (1)
19protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
SplitOrMergeIfStatements\SplitIntoConsecutiveIfStatementsTests.cs (1)
19protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
SplitOrMergeIfStatements\SplitIntoNestedIfStatementsTests.cs (1)
19protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
2883using var workspace = CreateWorkspaceFromOptions(input, parameters);
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
1227using var workspace = CreateWorkspaceFromOptions(source, testParameters);
src\Analyzers\CSharp\Tests\SimplifyInterpolation\SimplifyInterpolationTests.cs (1)
34using var workspace = CreateWorkspaceFromOptions("""
src\Analyzers\CSharp\Tests\UpdateProjectToAllowUnsafe\UpdateProjectToAllowUnsafeTests.cs (1)
33using (var workspace = CreateWorkspaceFromOptions(initialMarkup, parameters))
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (2)
38using (var workspace = CreateWorkspaceFromOptions(initialMarkup, parameters)) 60using var workspace = CreateWorkspaceFromOptions(initialMarkup, parameters);
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzerTests.cs (1)
659using var workspace = CreateWorkspaceFromOptions(source, testParameters);
Testing\CSharpTestMethodFinderTests.cs (2)
552var workspace = TestWorkspace.CreateCSharp([code, testAttributeDefinitionsCode]); 566var workspace = TestWorkspace.CreateCSharp([code, testAttributeDefinitionsCode]);
UseExplicitOrImplicitType\UseExplicitTypeRefactoringTests.cs (1)
18protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
UseExplicitOrImplicitType\UseImplicitTypeRefactoringTests.cs (1)
20protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
UseExpressionBody\Refactoring\UseExpressionBodyFixAllTests.cs (1)
19protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
UseExpressionBody\Refactoring\UseExpressionBodyForAccessorsRefactoringTests.cs (1)
23protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
UseExpressionBody\Refactoring\UseExpressionBodyForConstructorsRefactoringTests.cs (1)
22protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
UseExpressionBody\Refactoring\UseExpressionBodyForConversionOperatorsRefactoringTests.cs (1)
22protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
UseExpressionBody\Refactoring\UseExpressionBodyForIndexersRefactoringTests.cs (1)
23protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
UseExpressionBody\Refactoring\UseExpressionBodyForLocalFunctionsRefactoringTests.cs (1)
22protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
UseExpressionBody\Refactoring\UseExpressionBodyForMethodsRefactoringTests.cs (1)
21protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
UseExpressionBody\Refactoring\UseExpressionBodyForOperatorsRefactoringTests.cs (1)
22protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
UseExpressionBody\Refactoring\UseExpressionBodyForPropertiesRefactoringTests.cs (1)
24protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
UseExpressionBodyForLambda\UseExpressionBodyForLambdasRefactoringTests.cs (1)
22protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
UseRecursivePatterns\UseRecursivePatternsRefactoringFixAllTests.cs (1)
17protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
Wrapping\AbstractWrappingTests.cs (1)
20protected override CodeRefactoringProvider CreateCodeRefactoringProvider(TestWorkspace workspace, TestParameters parameters)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (15)
AutomaticCompletion\AbstractAutomaticLineEnderTests.cs (2)
114public static T GetService<T>(TestWorkspace workspace) 117public static T GetExportedValue<T>(TestWorkspace workspace)
Completion\AbstractCompletionProviderTests.cs (4)
955using var testWorkspace = TestWorkspace.Create(xmlString, composition: GetComposition()); 1011using var testWorkspace = TestWorkspace.Create(xmlString, composition: GetComposition());
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (4)
32using var workspace = TestWorkspace.Create( 56using var workspace = TestWorkspace.Create(
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
332TestWorkspace.CreateWorkspaceElement(languageName, files: markups, fileContainingFolders: lspOptions.DocumentFileContainingFolders, sourceGeneratedFiles: lspOptions.SourceGeneratedMarkups, commonReferences: commonReferences),
Structure\AbstractSyntaxStructureProviderTests.cs (4)
43using var workspace = TestWorkspace.Create(WorkspaceKind, LanguageName, compilationOptions: null, parseOptions: null, content: markupCode); 64using var workspace = TestWorkspace.Create(WorkspaceKind, LanguageName, compilationOptions: null, parseOptions: null, content: markupCode);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (327)
CodeFixes\CodeFixServiceTests.cs (4)
44using var workspace = TestWorkspace.CreateCSharp(code, composition: s_compositionWithMockDiagnosticUpdateSourceRegistrationService, openDocuments: true); 768using var workspace = TestWorkspace.CreateCSharp(code, composition: s_compositionWithMockDiagnosticUpdateSourceRegistrationService, openDocuments: true);
CodeGeneration\CodeGenerationTests.cs (7)
435var workspace = testContext.Workspace; 849public readonly TestWorkspace Workspace; 857TestWorkspace workspace, 875var workspace = CreateWorkspaceFromFile(initial.NormalizeLineEndings(), isVisualBasic, null, null); 990private static TestWorkspace CreateWorkspaceFromFile(string file, bool isVisualBasic, ParseOptions parseOptions, CompilationOptions compilationOptions) 993? TestWorkspace.CreateVisualBasic(file, (VB.VisualBasicParseOptions)parseOptions, (VB.VisualBasicCompilationOptions)compilationOptions) 994: TestWorkspace.CreateCSharp(file, (CS.CSharpParseOptions)parseOptions, (CS.CSharpCompilationOptions)compilationOptions);
CodeRefactorings\CodeRefactoringServiceTest.cs (10)
44using var workspace = TestWorkspace.CreateCSharp(code, composition: FeaturesTestCompositions.Features); 78using var workspace = TestWorkspace.Create(@" 95using var workspace = TestWorkspace.CreateCSharp(@"class Program {}", 157using var workspace = TestWorkspace.CreateCSharp("", composition: FeaturesTestCompositions.Features); 196using var workspace = TestWorkspace.CreateCSharp("", composition: FeaturesTestCompositions.Features);
Completion\CompletionServiceTests.cs (2)
39using var workspace = TestWorkspace.CreateCSharp(code, openDocuments: true);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (7)
622workspace.InitializeDocuments(TestWorkspace.CreateWorkspaceElement(LanguageNames.CSharp, files: files, sourceGeneratedFiles: sourceGeneratedFiles), openDocuments: false); 694using var workspace = TestWorkspace.CreateCSharp("class A { }"); 739using var workspace = TestWorkspace.CreateCSharp(source); 812using var workspace = TestWorkspace.CreateCSharp(source);
Diagnostics\DiagnosticDataTests.cs (5)
111using var workspace = new TestWorkspace(composition: EditorTestCompositions.EditorFeatures); 137using var workspace = new TestWorkspace(composition: EditorTestCompositions.EditorFeatures); 181using var workspace = TestWorkspace.CreateCSharp(files: [], sourceGeneratedFiles: [content], composition: EditorTestCompositions.EditorFeatures); 221using var workspace = new TestWorkspace(composition: EditorTestCompositions.EditorFeatures);
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (2)
110using var workspace = new TestWorkspace(); 705using var workspace = new TestWorkspace();
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (4)
56using var workspace = CreateWorkspaceFromFile(source, language, rootNamespace); 73private static TestWorkspace CreateWorkspaceFromFile(string source, string language, string rootNamespace) 77return TestWorkspace.CreateCSharp(source, composition: s_compositionWithMockDiagnosticUpdateSourceRegistrationService); 81return TestWorkspace.CreateVisualBasic(
EditAndContinue\EditAndContinueLanguageServiceTests.cs (4)
46private TestWorkspace CreateEditorWorkspace(out Solution solution, out EditAndContinueService service, out EditAndContinueLanguageService languageService, Type[] additionalParts = null) 55var workspace = new TestWorkspace(composition: composition, solutionTelemetryId: s_solutionTelemetryId); 98using var localWorkspace = new TestWorkspace(composition: localComposition); 240using var workspace = CreateEditorWorkspace(out var solution, out var service, out var languageService);
FindSymbols\SymbolTreeInfoTests.cs (8)
20using var workspace = TestWorkspace.CreateCSharp(""); 41using var workspace = TestWorkspace.CreateCSharp(""); 64using var workspace = TestWorkspace.CreateCSharp(""); 86using var workspace = TestWorkspace.CreateCSharp("");
InheritanceMargin\InheritanceMarginTests.cs (9)
54using var testWorkspace = TestWorkspace.Create( 83using var testWorkspace = TestWorkspace.Create( 92TestWorkspace testWorkspace, 124private static async Task VerifyInheritanceMemberAsync(TestWorkspace testWorkspace, TestInheritanceMemberItem expectedItem, InheritanceMarginItem actualItem) 207using var testWorkspace = TestWorkspace.Create( 310TestWorkspace testWorkspace)
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (5)
35public readonly TestWorkspace Workspace; 54var workspace = CreateWorkspace( 69public TestContext(TestWorkspace workspace) 244private static TestWorkspace CreateWorkspace( 295return TestWorkspace.Create(xmlString, composition: composition);
Options\GlobalOptionsTests.cs (3)
150private static TestWorkspace CreateWorkspace(out TestGlobalOptions globalOptions) 156var workspace = new TestWorkspace(composition: composition); 184using var workspace = CreateWorkspace(out var globalOptions);
Snippets\RoslynLSPSnippetConvertTests.cs (5)
401using var workspace = CreateWorkspaceFromCode(testString); 412using var workspace = CreateWorkspaceFromCode(testString); 485protected static TestWorkspace CreateWorkspaceFromCode(string code) 486=> TestWorkspace.CreateCSharp(code); 494using var workspace = CreateWorkspaceFromCode(markup);
StackTraceExplorer\StackTraceExplorerTests.cs (6)
24using var workspace = TestWorkspace.CreateCSharp(code); 815using var workspace = TestWorkspace.CreateCSharp(@" 848using var workspace = TestWorkspace.CreateCSharp(code);
Structure\BlockStructureServiceTests.cs (9)
39using var workspace = TestWorkspace.CreateCSharp(code); 63using var workspace = TestWorkspace.CreateCSharp(code); 87using var workspace = TestWorkspace.CreateCSharp(code); 104using var workspace = TestWorkspace.CreateCSharp(code); 113TestWorkspace workspace)
SymbolFinder\DependentTypeFinderTests.cs (21)
43private static TestWorkspace CreateWorkspace(TestHost host) 46return TestWorkspace.CreateWorkspace(XElement.Parse("<Workspace></Workspace>"), composition: composition); 52using var workspace = CreateWorkspace(host); 93using var workspace = CreateWorkspace(host); 140using var workspace = CreateWorkspace(host); 185using var workspace = CreateWorkspace(host); 226using var workspace = CreateWorkspace(host); 268using var workspace = CreateWorkspace(host); 310using var workspace = CreateWorkspace(host); 350using var workspace = CreateWorkspace(host); 391using var workspace = CreateWorkspace(host); 431using var workspace = CreateWorkspace(host); 462using var workspace = CreateWorkspace(host); 511using var workspace = CreateWorkspace(host); 563using var workspace = CreateWorkspace(host); 590using var workspace = CreateWorkspace(host); 623using var workspace = TestWorkspace.Create( 663using var workspace = CreateWorkspace(host); 727using var workspace = CreateWorkspace(host); 770using var workspace = CreateWorkspace(host);
SymbolFinder\FindSymbolAtPositionTests.cs (5)
18private static Task<ISymbol> FindSymbolAtPositionAsync(TestWorkspace workspace) 28using var workspace = TestWorkspace.CreateCSharp( 46using var workspace = TestWorkspace.CreateCSharp(
SymbolKey\SymbolKeyCrossLanguageTests.cs (2)
24using var workspace = TestWorkspace.Create(
Utilities\SymbolEquivalenceComparerTests.cs (170)
51using var workspace = TestWorkspace.CreateCSharp(csharpCode); 122using var csharpWorkspace = TestWorkspace.CreateCSharp(csharpCode); 123using var vbWorkspace = TestWorkspace.CreateVisualBasic(vbCode); 192using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 193using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 243using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 244using var workspace2 = TestWorkspace.CreateVisualBasic(vbCode1); 283using var workspace = TestWorkspace.CreateCSharp(code); 326using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 327using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 351using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 352using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 376using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 377using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 401using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 402using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 426using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 427using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 453using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 454using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 480using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 481using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 507using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 508using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 532using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 533using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 557using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 558using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 584using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 585using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 618using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 619using var workspace2 = TestWorkspace.CreateVisualBasic(vbCode1); 663using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 664using var workspace2 = TestWorkspace.CreateVisualBasic(vbCode1); 695using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 720using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 721using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 755using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 756using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 788using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 789using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 823using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 824using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 854using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 855using var workspace2 = TestWorkspace.CreateCSharp(csharpCode1); 931using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 932using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 968using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 969using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 993using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 994using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1018using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1019using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1049using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1050using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1079using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1080using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1110using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1111using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1150using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1151using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1180using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1181using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1210using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1211using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1241using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1242using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1272using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1273using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1304using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1305using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1341using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1342using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1405using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1406using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1468using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1469using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1531using var workspace1 = TestWorkspace.CreateCSharp(csharpCode1); 1532using var workspace2 = TestWorkspace.CreateCSharp(csharpCode2); 1619using var workspace1 = TestWorkspace.CreateCSharp(code); 1620using var workspace2 = TestWorkspace.CreateCSharp(code); 1693using var workspace1 = TestWorkspace.CreateVisualBasic(code); 1694using var workspace2 = TestWorkspace.CreateVisualBasic(code); 1716using var workspace1 = TestWorkspace.CreateCSharp(csharpCode, compilationOptions: new CS.CSharpCompilationOptions(OutputKind.NetModule, moduleName: "GooModule")); 1717using var workspace2 = TestWorkspace.CreateCSharp(csharpCode, compilationOptions: new CS.CSharpCompilationOptions(OutputKind.NetModule, moduleName: "BarModule"));
ValueTracking\AbstractBaseValueTrackingTests.cs (8)
21protected TestWorkspace CreateWorkspace(string code, TestHost testHost) 24protected abstract TestWorkspace CreateWorkspace(string code, TestComposition composition); 26internal static async Task<ImmutableArray<ValueTrackedItem>> GetTrackedItemsAsync(TestWorkspace testWorkspace, CancellationToken cancellationToken = default) 36internal static async Task<ImmutableArray<ValueTrackedItem>> GetTrackedItemsAsync(TestWorkspace testWorkspace, ValueTrackedItem item, CancellationToken cancellationToken = default) 42internal static async Task<ImmutableArray<ValueTrackedItem>> ValidateItemsAsync(TestWorkspace testWorkspace, (int line, string text)[] itemInfo, CancellationToken cancellationToken = default) 55internal static async Task<ImmutableArray<ValueTrackedItem>> ValidateChildrenAsync(TestWorkspace testWorkspace, ValueTrackedItem item, (int line, string text)[] childInfo, CancellationToken cancellationToken = default) 68internal static async Task ValidateChildrenEmptyAsync(TestWorkspace testWorkspace, ValueTrackedItem item, CancellationToken cancellationToken = default) 74internal static async Task ValidateChildrenEmptyAsync(TestWorkspace testWorkspace, IEnumerable<ValueTrackedItem> items, CancellationToken cancellationToken = default)
ValueTracking\CSharpValueTrackingTests.cs (21)
16protected override TestWorkspace CreateWorkspace(string code, TestComposition composition) 17=> TestWorkspace.CreateCSharp(code, composition: composition); 36using var workspace = CreateWorkspace(code, testHost); 69using var workspace = CreateWorkspace(code, testHost); 101using var workspace = CreateWorkspace(code, testHost); 134using var workspace = CreateWorkspace(code, testHost); 165using var workspace = CreateWorkspace(code, testHost); 191using var workspace = CreateWorkspace(code, testHost); 217using var workspace = CreateWorkspace(code, testHost); 235using var workspace = CreateWorkspace(code, testHost); 256using var workspace = CreateWorkspace(code, testHost); 306using var workspace = CreateWorkspace(code, testHost); 432using var workspace = CreateWorkspace(code, testHost); 572using var workspace = CreateWorkspace(code, testHost); 650using var workspace = CreateWorkspace(code, testHost); 709using var workspace = CreateWorkspace(code, testHost); 771using var workspace = CreateWorkspace(code, testHost); 837using var workspace = CreateWorkspace(code, testHost); 906using var workspace = CreateWorkspace(code, testHost); 968using var workspace = CreateWorkspace(code, testHost); 1018using var workspace = CreateWorkspace(code, testHost);
ValueTracking\VisualBasicValueTrackingTests.cs (10)
16protected override TestWorkspace CreateWorkspace(string code, TestComposition composition) 17=> TestWorkspace.CreateVisualBasic(code, composition: composition); 46using var workspace = CreateWorkspace(code, testHost); 90using var workspace = CreateWorkspace(code, testHost); 128using var workspace = CreateWorkspace(code, testHost); 159using var workspace = CreateWorkspace(code, testHost); 185using var workspace = CreateWorkspace(code, testHost); 221using var workspace = CreateWorkspace(code, testHost); 280using var workspace = CreateWorkspace(code, testHost); 341using var workspace = CreateWorkspace(code, testHost);
Microsoft.CodeAnalysis.Features.Test.Utilities (8)
EditAndContinue\ActiveStatementsDescription.cs (1)
145var documentName = filePaths?[sourceIndex] ?? Path.Combine(TempRoot.Root, TestWorkspace.GetDefaultTestSourceDocumentName(sourceIndex, extension ?? ""));
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (3)
69internal TestWorkspace CreateWorkspace(out Solution solution, out EditAndContinueService service, Type[]? additionalParts = null) 75var workspace = new TestWorkspace(composition: composition, solutionTelemetryId: s_solutionTelemetryId); 147internal EditAndContinueService GetEditAndContinueService(TestWorkspace workspace)
RelatedDocuments\AbstractRelatedDocumentsTests.cs (2)
24using var workspace = TestWorkspace.Create(
Snippets\AbstractSnippetProviderTests.cs (2)
31using var workspace = new TestWorkspace(FeaturesTestCompositions.Features); 114using var workspace = new TestWorkspace(FeaturesTestCompositions.Features);
Microsoft.CodeAnalysis.Features.UnitTests (108)
EditAndContinue\ActiveStatementsMapTests.cs (3)
93using var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features); 160using var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features); 201using var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features);
EditAndContinue\CompileTimeSolutionProviderTests.cs (2)
27var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features); 76var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features);
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (27)
79using var _ = CreateWorkspace(out var solution, out var service, [typeof(NoCompilationLanguageService)]); 165using var _ = CreateWorkspace(out var solution, out var service); 198using var _ = CreateWorkspace(out var solution, out var service); 232using var _ = CreateWorkspace(out var solution, out var service, [typeof(NoCompilationLanguageService)]); 279using var _ = CreateWorkspace(out var solution, out var service); 308using var _ = CreateWorkspace(out var solution, out var service); 341using var _ = CreateWorkspace(out var solution, out var service); 392using var _ = CreateWorkspace(out var solution, out var service); 497using var _w = CreateWorkspace(out var solution, out var service); 566using var _ = CreateWorkspace(out var solution, out var service); 617using var _ = CreateWorkspace(out var solution, out var service); 675using var _ = CreateWorkspace(out var solution, out var service); 760using var _ = CreateWorkspace(out var solution, out var service); 812using var _ = CreateWorkspace(out var solution, out var service); 862using var _ = CreateWorkspace(out var solution, out var service); 913using var workspace = CreateWorkspace(out var solution, out var service); 961using var _ = CreateWorkspace(out var solution, out var service); 1028using var _ = CreateWorkspace(out var solution, out var service); 1104using var _ = CreateWorkspace(out var solution, out var service); 1138using var _ = CreateWorkspace(out var solution, out var service); 1239using var _ = CreateWorkspace(out var solution, out var service); 1282using var _ = CreateWorkspace(out var solution, out var service); 1343using var _ = CreateWorkspace(out var solution, out var service); 1447using var _ = CreateWorkspace(out var solution, out var service); 1487using var _ = CreateWorkspace(out var solution, out var service); 1531using var _ = CreateWorkspace(out var solution, out var service, [typeof(NoCompilationLanguageService)]); 1606using var _ = CreateWorkspace(out var solution, out var service);
EditAndContinue\EditSessionActiveStatementsTests.cs (5)
64private static async Task<Solution> AddDefaultTestSolutionAsync(TestWorkspace workspace, string[] markedSources) 171using var workspace = new TestWorkspace(composition: s_composition); 334using var workspace = new TestWorkspace(composition: s_composition); 516using var workspace = new TestWorkspace(composition: s_composition); 651using var workspace = new TestWorkspace(composition: s_composition);
EditAndContinue\EmitSolutionUpdateResultsTests.cs (9)
27private static TestWorkspace CreateWorkspace(out Solution solution) 29var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features); 64using var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features); 160using var _ = CreateWorkspace(out var solution); 186using var _ = CreateWorkspace(out var solution); 215using var _ = CreateWorkspace(out var solution); 241using var _ = CreateWorkspace(out var solution); 271using var _ = CreateWorkspace(out var solution); 301using var _ = CreateWorkspace(out var solution);
EditAndContinue\RemoteEditAndContinueServiceTests.cs (1)
50using var localWorkspace = new TestWorkspace(composition: localComposition);
EditAndContinue\UnitTestingHotReloadServiceTests.cs (1)
35using var workspace = CreateWorkspace(out var solution, out var encService);
EditAndContinue\WatchHotReloadServiceTests.cs (2)
46using var workspace = CreateWorkspace(out var solution, out var encService); 121using var workspace = CreateWorkspace(out var solution, out var encService);
FindUsages\DefinitionItemFactoryTests.cs (58)
128using var workspace = TestWorkspace.CreateCSharp("class C;"); 164using var workspace = TestWorkspace.CreateCSharp(""); 206using var workspace = TestWorkspace.CreateCSharp("class C;"); 242using var workspace = TestWorkspace.CreateCSharp(""); 284using var workspace = TestWorkspace.CreateCSharp("namespace N;"); 326using var workspace = TestWorkspace.CreateCSharp(""); 376using var workspace = TestWorkspace.CreateCSharp(""" 433using var workspace = TestWorkspace.CreateCSharp("namespace N {}"); 473using var workspace = TestWorkspace.CreateCSharp("namespace N {}"); 513using var workspace = TestWorkspace.CreateCSharp("class C;"); 555using var workspace = TestWorkspace.CreateCSharp(""); 601using var workspace = TestWorkspace.Create(""" 659using var workspace = TestWorkspace.CreateCSharp("class C { dynamic F; }"); 696using var workspace = TestWorkspace.CreateCSharp("class C { (int a, int b) F; }"); 758using var workspace = TestWorkspace.CreateCSharp("class C { System.ValueTuple<int, int> F; }"); 814using var workspace = TestWorkspace.CreateCSharp("class C<T1, T2> { C<int, string> F; }"); 865using var workspace = TestWorkspace.CreateCSharp(""" 923using var workspace = TestWorkspace.CreateCSharp("class C<T>;"); 973using var workspace = TestWorkspace.CreateCSharp("class C { void M(int x) { } }"); 1028using var workspace = TestWorkspace.CreateCSharp("class C { int M; }"); 1080using var workspace = TestWorkspace.CreateCSharp("class C { int P { get; set; } }"); 1142using var workspace = TestWorkspace.CreateCSharp("class C { int P { get; set; } }"); 1199using var workspace = TestWorkspace.CreateCSharp("class C { int P { get; set; } }"); 1256using var workspace = TestWorkspace.CreateCSharp("abstract class C { abstract int this[int x] { get; set; } }"); 1323using var workspace = TestWorkspace.CreateCSharp(""" 1383using var workspace = TestWorkspace.CreateCSharp(""" 1440using var workspace = TestWorkspace.CreateCSharp("class C { void M(int x) { void F() {} } }"); 1498using var workspace = TestWorkspace.CreateCSharp(""" 1561using var workspace = TestWorkspace.Create("""
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (4)
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (4)
18private static TestWorkspace CreateWorkspace() 20var workspace = new TestWorkspace(LspTestCompositions.LanguageServerProtocol 33using var workspace = CreateWorkspace(); 101using var workspace = CreateWorkspace();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (15)
Workspaces\TestHostProject.cs (2)
42TestWorkspace workspace, 90TestWorkspace workspace,
Workspaces\TestWorkspace_Create.cs (13)
14public static TestWorkspace Create(string xmlDefinition, bool openDocuments = false, TestComposition composition = null) 17public static TestWorkspace CreateWorkspace( 26internal static TestWorkspace Create( 34var workspace = new TestWorkspace(composition, workspaceKind, ignoreUnchangeableDocumentsWhenApplyingChanges: ignoreUnchangeableDocumentsWhenApplyingChanges); 43internal static TestWorkspace Create( 56internal static TestWorkspace Create( 67internal static TestWorkspace Create( 77internal static TestWorkspace Create( 96internal static TestWorkspace CreateWithSingleEmptySourceFile( 115public static TestWorkspace CreateCSharp( 127public static TestWorkspace CreateCSharp( 144public static TestWorkspace CreateVisualBasic( 155public static TestWorkspace CreateVisualBasic(
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (8)
DesignerAttribute\DesignerAttributeServiceTests.cs (2)
117using var workspace = TestWorkspace.CreateCSharp(codeWithMarker, openDocuments: false);
F1Help\F1HelpTests.cs (2)
26using var workspace = TestWorkspace.CreateCSharp(markup, composition: VisualStudioTestCompositions.LanguageServices);
Interactive\Commands\ResetInteractiveTests.cs (4)
49using var workspace = TestWorkspace.Create(WorkspaceXmlStr, composition: EditorTestCompositions.InteractiveWindow); 67TestWorkspace workspace, 140private static IEnumerable<string> GetProjectReferences(TestWorkspace workspace, Project project)
Microsoft.VisualStudio.LanguageServices.UnitTests (22)
Debugging\VisualBasicBreakpointResolutionServiceTests.vb (1)
27Using workspace = TestWorkspace.CreateVisualBasic(source)
Help\HelpTests.vb (1)
18Using workspace = TestWorkspace.CreateVisualBasic(markup)
Options\BasicEditorConfigGeneratorTests.vb (2)
21Using workspace = TestWorkspace.CreateVisualBasic("") 172Using workspace = TestWorkspace.CreateVisualBasic("")
Options\CSharpEditorConfigGeneratorTests.vb (2)
19Using workspace = TestWorkspace.CreateCSharp("") 276Using workspace = TestWorkspace.CreateCSharp("")
Preview\PreviewChangesTests.vb (2)
23Using workspace = TestWorkspace.CreateCSharp(<text> 123Using workspace = TestWorkspace.CreateCSharp(<text>
Progression\SearchGraphQueryTests_NavigateTo.vb (1)
380<Project Language="C#" CommonReferences="true" FilePath=<%= TestWorkspace.NullFilePath %>>
SymbolSearch\SymbolSearchUpdateEngineTests.vb (13)
26Using workspace = TestWorkspace.CreateCSharp("") 57Using workspace = TestWorkspace.CreateCSharp("") 85Using workspace = TestWorkspace.CreateCSharp("") 123Using workspace = TestWorkspace.CreateCSharp("") 166Using workspace = TestWorkspace.CreateCSharp("") 199Using workspace = TestWorkspace.CreateCSharp("") 247Using workspace = TestWorkspace.CreateCSharp("") 290Using workspace = TestWorkspace.CreateCSharp("") 338Using workspace = TestWorkspace.CreateCSharp("") 397Using workspace = TestWorkspace.CreateCSharp("") 441Using workspace = TestWorkspace.CreateCSharp("") 495Using workspace = TestWorkspace.CreateCSharp("") 555Using workspace = TestWorkspace.CreateCSharp("")
Roslyn.VisualStudio.Next.UnitTests (97)
Services\AssetProviderTests.cs (9)
49using var workspace = TestWorkspace.CreateCSharp(file: @""); 73using var workspace = TestWorkspace.CreateCSharp(code); 101using var workspace = TestWorkspace.CreateCSharp(code); 126using var workspace = TestWorkspace.CreateCSharp(code); 156using var workspace = TestWorkspace.CreateCSharp([code1, code2]);
Services\ServiceHubServicesTests.cs (11)
43private static TestWorkspace CreateWorkspace(Type[] additionalParts = null) 51using var workspace = CreateWorkspace(); 73using var workspace = CreateWorkspace(); 126using var workspace = CreateWorkspace(); 177using var workspace = CreateWorkspace(); 248using var workspace = CreateWorkspace(); 283using var workspace = CreateWorkspace(); 420using var localWorkspace = CreateWorkspace(); 764private static DocumentId AddSimpleDocument(TestWorkspace workspace, CallbackGenerator generator) 782private static async Task WaitForSourceGeneratorsAsync(TestWorkspace workspace) 1469TestWorkspace localWorkspace,
Services\SolutionServiceTests.cs (67)
48using var workspace = TestWorkspace.CreateCSharp(code); 65using var workspace = TestWorkspace.CreateCSharp(code1); 140using var workspace = TestWorkspace.CreateCSharp(code); 166using var workspace = TestWorkspace.CreateCSharp(""); 214using var workspace = TestWorkspace.CreateCSharp(""); 249using var workspace = TestWorkspace.CreateCSharp(""); 329using var workspace = TestWorkspace.CreateCSharp(code); 360using var workspace = TestWorkspace.CreateCSharp(code); 393using var workspace = TestWorkspace.CreateCSharp(code); 425using var workspace = TestWorkspace.CreateCSharp(code); 487using var workspace = TestWorkspace.CreateCSharp(@"public class C { }"); 506using var workspace = TestWorkspace.CreateCSharp(@""); 545using var workspace = TestWorkspace.CreateCSharp(code); 586using var workspace = TestWorkspace.CreateCSharp(code); 627using var workspace = TestWorkspace.CreateCSharp(code); 660using var workspace = TestWorkspace.CreateCSharp(code); 701using var workspace = TestWorkspace.CreateCSharp(code); 741using var workspace = TestWorkspace.CreateCSharp(code); 781using var workspace = TestWorkspace.CreateCSharp(code); 814using var workspace = TestWorkspace.CreateCSharp(code); 869using var workspace = TestWorkspace.CreateCSharp(code); 915using var workspace = TestWorkspace.CreateCSharp(code); 938using var workspace = TestWorkspace.CreateCSharp(code); 972private static IAsynchronousOperationWaiter GetWorkspaceWaiter(TestWorkspace workspace) 983using var workspace = TestWorkspace.CreateCSharp(code); 1002using var workspace = TestWorkspace.CreateCSharp(code, composition: s_compositionWithFirstDocumentIsActiveAndVisible); 1019using var workspace = TestWorkspace.Create(""" 1054using var workspace = TestWorkspace.Create(""" 1098using var workspace = TestWorkspace.CreateCSharp(code, composition: s_compositionWithFirstDocumentIsActiveAndVisible); 1125using var workspace = TestWorkspace.CreateCSharp(code, composition: s_compositionWithFirstDocumentIsActiveAndVisible); 1154using var workspace = TestWorkspace.CreateCSharp(code, composition: s_compositionWithFirstDocumentIsActiveAndVisible); 1186using var workspace = TestWorkspace.Create(""" 1261using var workspace = TestWorkspace.CreateCSharp(code); 1267TestWorkspace workspace, 1274TestWorkspace workspace,
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (10)
48using var workspace = CreateWorkspace(LanguageNames.CSharp, code); 76using var workspace = CreateWorkspace(LanguageNames.VisualBasic, code); 109using var workspace = CreateWorkspace(LanguageNames.CSharp, code); 149using var workspace = CreateWorkspace(LanguageNames.CSharp, code); 187using var workspace = CreateWorkspace(LanguageNames.CSharp, code); 218private static async Task<DiagnosticAnalysisResult> AnalyzeAsync(TestWorkspace workspace, ProjectId projectId, Type analyzerType, bool isHostAnalyzer, CancellationToken cancellationToken = default) 248private static TestWorkspace CreateWorkspace(string language, string code, ParseOptions options = null) 252var workspace = (language == LanguageNames.CSharp) 253? TestWorkspace.CreateCSharp(code, parseOptions: options, composition: composition) 254: TestWorkspace.CreateVisualBasic(code, parseOptions: options, composition: composition);