101 references to AddParts
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (23)
CodeActions\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (1)
35EditorTestCompositions.EditorFeatures.AddParts(typeof(TestPickMembersService));
CodeActions\MoveStaticMembers\CSharpMoveStaticMembersTests.cs (1)
21private static readonly TestComposition s_testServices = FeaturesTestCompositions.Features.AddParts(typeof(TestMoveStaticMembersService));
CodeActions\PreviewTests.cs (1)
28.AddParts(
Completion\CompletionProviders\SnippetCompletionProviderTests.cs (1)
33=> base.GetComposition().AddParts(typeof(MockSnippetInfoService));
Completion\CompletionServiceTests.cs (3)
48using var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features.AddParts(typeof(ThirdPartyCompletionProvider))); 105using var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features.AddParts(typeof(ThirdPartyCompletionProvider))); 128using var workspace = new EditorTestWorkspace(composition: EditorTestCompositions.EditorFeatures.AddParts(typeof(ThirdPartyCompletionProvider)));
ConvertNamespace\ConvertNamespaceCommandHandlerTests.cs (1)
21private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeaturesWpf.AddParts(
EventHookup\EventHookupTestState.cs (1)
24private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeaturesWpf.AddParts(
Formatting\CodeCleanupTests.cs (1)
787using var workspace = EditorTestWorkspace.CreateCSharp(code, composition: EditorTestCompositions.EditorFeaturesWpf.AddParts(typeof(TCodefix)));
Formatting\Indentation\CSharpFormatterTestsBase.cs (1)
34private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeatures.AddParts(typeof(TestFormattingRuleFactoryServiceFactory));
Formatting\Indentation\SmartIndenterTests.cs (1)
28.AddParts(typeof(TestFormattingRuleFactoryServiceFactory));
MoveToNamespace\MoveToNamespaceTests.cs (2)
27.AddParts( 30private static readonly TestComposition s_composition = s_compositionWithoutOptions.AddParts(
NavigateTo\NavigateToSearcherTests.cs (1)
27private static readonly TestComposition FirstActiveAndVisibleComposition = EditorTestCompositions.EditorFeatures.AddParts(typeof(FirstDocumentIsActiveAndVisibleDocumentTrackingService.Factory));
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
246.AddParts(typeof(PdbSourceDocumentMetadataAsSourceFileProvider), typeof(NullResultMetadataAsSourceFileProvider));
RawStringLiteral\RawStringLiteralCommandHandlerTests.cs (1)
22private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeaturesWpf.AddParts(
StringCopyPaste\StringCopyPasteCommandHandlerTests.cs (3)
33.AddParts(typeof(StringCopyPasteCommandHandler)); 38.AddParts(typeof(TestStringCopyPasteService)) 39.AddParts(typeof(StringCopyPasteCommandHandler));
TaskList\NoCompilationTaskListTests.cs (1)
35</Workspace>"), composition: composition.AddParts(
Workspaces\WorkspaceTests_EditorFeatures.cs (2)
474using var workspace = CreateWorkspace(composition: EditorTestCompositions.EditorFeatures.AddParts(typeof(TestWorkspaceConfigurationService))); 591var composition = EditorTestCompositions.EditorFeatures.AddParts(
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (15)
Completion\AbstractArgumentProviderTests`1.cs (1)
36=> s_baseComposition.AddParts(GetArgumentProviderType());
Completion\AbstractCompletionProviderTests.cs (1)
89=> s_baseComposition.AddParts(GetCompletionProviderType());
EditorTestCompositions.cs (3)
51.AddParts( 60.AddParts(typeof(TestGlobalOperationNotificationService)) 76.AddParts(
ExtractInterface\ExtractInterfaceTestState.cs (1)
23public static readonly TestComposition Composition = EditorTestCompositions.EditorFeatures.AddParts(
Formatting\CoreFormatterTestsBase.cs (1)
42private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeatures.AddParts(typeof(TestFormattingRuleFactoryServiceFactory));
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (1)
26=> _lazyComposition ??= s_baseComposition.AddParts(GetHighlighterType());
LanguageServer\AbstractLanguageServerProtocolTests.cs (4)
54.AddParts(typeof(TestDocumentTrackingService)) 55.AddParts(typeof(TestWorkspaceRegistrationService)); 58.AddParts(typeof(TestDocumentTrackingService)) 59.AddParts(typeof(TestWorkspaceRegistrationService));
NavigateTo\AbstractNavigateToTests.cs (3)
43protected static readonly TestComposition DefaultComposition = EditorTestCompositions.EditorFeatures.AddParts(typeof(TestWorkspaceNavigateToSearchHostService)); 44protected static readonly TestComposition FirstVisibleComposition = EditorTestCompositions.EditorFeatures.AddParts(typeof(TestWorkspaceNavigateToSearchHostService), typeof(FirstDocIsVisibleDocumentTrackingService.Factory)); 45protected static readonly TestComposition FirstActiveAndVisibleComposition = EditorTestCompositions.EditorFeatures.AddParts(typeof(TestWorkspaceNavigateToSearchHostService), typeof(FirstDocumentIsActiveAndVisibleDocumentTrackingService.Factory));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (11)
CodeRefactorings\CodeRefactoringServiceTest.cs (2)
76var composition = FeaturesTestCompositions.Features.AddParts(typeof(TypeScriptCodeRefactoringProvider)); 96composition: EditorTestCompositions.EditorFeatures.AddParts(typeof(T)));
Diagnostics\DiagnosticAnalyzerServiceTests.cs (4)
37.AddParts(typeof(TestDocumentTrackingService)); 42=> new AdhocWorkspace(s_featuresCompositionWithMockDiagnosticUpdateSourceRegistrationService.AddParts(additionalParts).GetHostServices()); 504using var workspace = EditorTestWorkspace.CreateCSharp("class A {}", composition: s_editorFeaturesCompositionWithMockDiagnosticUpdateSourceRegistrationService.AddParts(typeof(TestDocumentTrackingService))); 611var composition = s_editorFeaturesCompositionWithMockDiagnosticUpdateSourceRegistrationService.AddParts(
EditAndContinue\EditAndContinueLanguageServiceTests.cs (3)
49.AddParts( 53.AddParts(additionalParts); 91.AddParts(
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
293.AddParts(typeof(DecompilationMetadataAsSourceFileProvider));
Options\GlobalOptionsTests.cs (1)
154AddParts(typeof(TestGlobalOptions));
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (2)
72.AddParts(typeof(TestWorkspaceConfigurationService)) 73.AddParts(additionalParts);
Microsoft.CodeAnalysis.Features.UnitTests (3)
EditAndContinue\EditSessionActiveStatementsTests.cs (1)
31private static readonly TestComposition s_composition = FeaturesTestCompositions.Features.AddParts(typeof(NoCompilationLanguageService));
EditAndContinue\RemoteEditAndContinueServiceTests.cs (2)
41.AddParts(typeof(NoCompilationLanguageService)); 47.AddParts(typeof(MockEditAndContinueService));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (21)
Completion\CompletionFeaturesTests.cs (4)
393Composition.AddParts(typeof(CSharpLspMockCompletionService.Factory))); 440composition: Composition.AddParts(typeof(CSharpLspMockCompletionService.Factory))); 767composition: Composition.AddParts(typeof(CSharpLspMockCompletionService.Factory))); 927composition: Composition.AddParts(typeof(CSharpLspThrowExceptionOnChangeCompletionService.Factory)));
HandlerTests.cs (2)
29protected override TestComposition Composition => base.Composition.AddParts( 117composition: Composition.AddParts(typeof(TestDuplicateLanguageSpecificHandler))));
InlineCompletions\InlineCompletionsTests.cs (1)
25.AddParts(typeof(TestSnippetInfoService));
LanguageServerTargetTests.cs (1)
28protected override TestComposition Composition => base.Composition.AddParts(typeof(StatefulLspServiceFactory), typeof(StatelessLspService));
MapCode\MapCodeTests.cs (1)
44.AddParts(typeof(TestMapCodeService));
Options\LspOptionsTests.cs (2)
23.AddParts(typeof(TestDocumentTrackingService)) 24.AddParts(typeof(TestWorkspaceRegistrationService));
Ordering\RequestOrderingTests.cs (6)
27.AddParts(typeof(MutatingRequestHandler)) 28.AddParts(typeof(NonMutatingRequestHandler)) 29.AddParts(typeof(FailingRequestHandler)) 30.AddParts(typeof(FailingMutatingRequestHandler)) 31.AddParts(typeof(NonLSPSolutionRequestHandler)) 32.AddParts(typeof(LongRunningNonMutatingRequestHandler));
References\FindAllReferencesHandlerFeaturesTests.cs (2)
19.AddParts(typeof(TestDocumentTrackingService)) 20.AddParts(typeof(TestWorkspaceRegistrationService));
UriTests.cs (1)
28protected override TestComposition Composition => base.Composition.AddParts(typeof(CustomResolveHandler));
VSTypeScriptHandlerTests.cs (1)
32protected override TestComposition Composition => base.Composition.AddParts(typeof(TypeScriptHandlerFactory));
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (1)
src\Analyzers\VisualBasic\Tests\NamingStyles\NamingStylesTests.vb (1)
24Return MyBase.GetComposition().AddParts(GetType(TestSymbolRenamedCodeActionOperationFactoryWorkspaceService))
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (7)
MEF\ExportProviderCache.cs (1)
26.AddParts(typeof(TestSerializerService.Factory));
MEF\FeaturesTestCompositions.cs (3)
16.AddParts( 25.AddParts(typeof(TestSerializerService.Factory)); 28=> (host == TestHost.InProcess) ? composition : composition.AddAssemblies(typeof(RemoteWorkspacesResources).Assembly).AddParts(typeof(InProcRemoteHostClientProvider.Factory));
Remote\InProcRemoteHostClientProvider.cs (1)
55var hostServices = FeaturesTestCompositions.RemoteHost.AddParts(additionalRemoteParts).AddExcludedPartTypes(excludedRemoteParts).GetHostServices();
Workspaces\TestWorkspace`1.cs (1)
171composition = composition.AddParts(typeof(TestWorkspaceConfigurationService));
WorkspaceTestUtilities.cs (1)
15=> new WorkspaceWithPartialSemantics(FeaturesTestCompositions.Features.AddParts(additionalParts).WithTestHostParts(testHost).GetHostServices());
Microsoft.CodeAnalysis.Workspaces.UnitTests (11)
FindReferencesTests.cs (1)
25=> new AdhocWorkspace(FeaturesTestCompositions.Features.AddParts(additionalParts).GetHostServices());
Formatter\FormatterTests.cs (2)
48var hostServices = s_composition.AddParts([typeof(NoCompilationLanguageService), typeof(TestFormattingService)]).GetHostServices(); 65var hostServices = s_composition.AddParts([typeof(NoCompilationLanguageService), typeof(TestFormattingService)]).GetHostServices();
SolutionTests\SolutionTestHelpers.cs (1)
17=> new AdhocWorkspace(FeaturesTestCompositions.Features.AddParts(additionalParts).WithTestHostParts(testHost).GetHostServices());
SolutionTests\SolutionTests.cs (1)
3835var hostServices = FeaturesTestCompositions.Features.AddParts(
TestCompositionTests.cs (5)
18var composition1 = FeaturesTestCompositions.Features.AddParts(typeof(TestErrorReportingService), typeof(TestSourceGeneratorTelemetryCollectorWorkspaceServiceFactory)); 19var composition2 = FeaturesTestCompositions.Features.AddParts(typeof(TestSourceGeneratorTelemetryCollectorWorkspaceServiceFactory), typeof(TestErrorReportingService)); 45var composition2 = composition1.AddParts(type1); 88var composition1 = TestComposition.Empty.AddAssemblies(assembly1).AddParts(type1).AddExcludedPartTypes(excluded1); 89var composition2 = TestComposition.Empty.AddAssemblies(assembly2).AddParts(type1, type2).AddExcludedPartTypes(excluded2);
WorkspaceTests\DynamicFileInfoProviderMefTests.cs (1)
49var composition = TestComposition.Empty.AddParts(typeof(TestDynamicFileInfoProviderThatProducesNoFiles));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (3)
DocumentOutline\DocumentOutlineTestsBase.cs (2)
73.AddParts(typeof(TestDocumentTrackingService)) 74.AddParts(typeof(TestWorkspaceRegistrationService))
EditorConfigSettings\Aggregator\SettingsAggregatorTests.cs (1)
20=> new AdhocWorkspace(VisualStudioTestCompositions.LanguageServices.AddParts(additionalParts).GetHostServices(), WorkspaceKind.Host);
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
Venus\DocumentService_IntegrationTests.vb (1)
65Dim composition = EditorTestCompositions.EditorFeatures.AddParts(GetType(MockServiceProvider))
Roslyn.VisualStudio.Next.UnitTests (3)
Remote\SnapshotSerializationTests.cs (1)
42=> new AdhocWorkspace(FeaturesTestCompositions.Features.AddParts(additionalParts).WithTestHostParts(TestHost.OutOfProcess).GetHostServices());
Services\ServiceHubServicesTests.cs (1)
44=> new(composition: FeaturesTestCompositions.Features.WithTestHostParts(TestHost.OutOfProcess).AddParts(additionalParts));
Services\SolutionServiceTests.cs (1)
38s_composition.AddParts(typeof(FirstDocumentIsActiveAndVisibleDocumentTrackingService.Factory));