160 references to AddParts
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (1)
AbstractCodeActionOrUserDiagnosticTest.cs (1)
146.AddParts(typeof(MockDiagnosticUpdateSourceRegistrationService));
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
NamingStylesTests.cs (1)
37=> base.GetComposition().AddParts(typeof(TestSymbolRenamedCodeActionOperationFactoryWorkspaceService));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (26)
CodeActions\Preview\PreviewTests.cs (1)
32.AddParts(
Completion\CompletionProviders\SnippetCompletionProviderTests.cs (1)
33=> base.GetComposition().AddParts(typeof(MockSnippetInfoService));
Completion\CompletionServiceTests.cs (3)
49using var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features.AddParts(typeof(ThirdPartyCompletionProvider))); 106using var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features.AddParts(typeof(ThirdPartyCompletionProvider))); 129using var workspace = new TestWorkspace(composition: EditorTestCompositions.EditorFeatures.AddParts(typeof(ThirdPartyCompletionProvider)));
ConvertNamespace\ConvertNamespaceCommandHandlerTests.cs (1)
23private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeaturesWpf.AddParts(
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
37.AddParts(typeof(MockDiagnosticUpdateSourceRegistrationService));
Diagnostics\GenerateType\GenerateTypeTests.cs (1)
44.AddParts(typeof(MockDiagnosticUpdateSourceRegistrationService));
Diagnostics\Suppression\SuppressionAllCodeTests.cs (1)
28.AddParts(typeof(MockDiagnosticUpdateSourceRegistrationService));
EventHookup\EventHookupTestState.cs (1)
25private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeaturesWpf.AddParts(
Formatting\CodeCleanupTests.cs (1)
724using var workspace = TestWorkspace.CreateCSharp(code, composition: EditorTestCompositions.EditorFeaturesWpf.AddParts(typeof(TCodefix)));
Formatting\Indentation\CSharpFormatterTestsBase.cs (1)
38private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeatures.AddParts(typeof(TestFormattingRuleFactoryServiceFactory));
Formatting\Indentation\SmartIndenterTests.cs (1)
30.AddParts(typeof(TestFormattingRuleFactoryServiceFactory));
GenerateFromMembers\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (1)
35EditorTestCompositions.EditorFeatures.AddParts(typeof(TestPickMembersService));
MoveStaticMembers\CSharpMoveStaticMembersTests.cs (1)
22private static readonly TestComposition s_testServices = FeaturesTestCompositions.Features.AddParts(typeof(TestMoveStaticMembersService));
MoveToNamespace\MoveToNamespaceTests.cs (2)
32.AddParts( 36private static readonly TestComposition s_composition = s_compositionWithoutOptions.AddParts(
NamingStylesTests.cs (1)
37=> base.GetComposition().AddParts(typeof(TestSymbolRenamedCodeActionOperationFactoryWorkspaceService));
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
238.AddParts(typeof(PdbSourceDocumentMetadataAsSourceFileProvider), typeof(NullResultMetadataAsSourceFileProvider));
RawStringLiteral\RawStringLiteralCommandHandlerTests.cs (1)
21private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeaturesWpf.AddParts(
Squiggles\ErrorSquiggleProducerTests.cs (1)
299.AddParts(typeof(MockDiagnosticAnalyzerService));
StringCopyPaste\StringCopyPasteCommandHandlerTests.cs (3)
36.AddParts(typeof(StringCopyPasteCommandHandler)); 41.AddParts(typeof(TestStringCopyPasteService)) 42.AddParts(typeof(StringCopyPasteCommandHandler));
TaskList\NoCompilationTaskListTests.cs (1)
35</Workspace>"), composition: composition.AddParts(
Workspaces\WorkspaceTests_EditorFeatures.cs (1)
565var composition = EditorTestCompositions.EditorFeatures.AddParts(typeof(TestDocumentTrackingService));
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (5)
ChangeSignature\AbstractChangeSignatureTests.cs (1)
30=> base.GetComposition().AddParts(typeof(TestChangeSignatureOptionsService));
ChangeSignature\ChangeSignatureTestState.cs (1)
30private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeatures.AddParts(typeof(TestChangeSignatureOptionsService));
CodeActions\AbstractCodeActionOrUserDiagnosticTest.cs (1)
146.AddParts(typeof(MockDiagnosticUpdateSourceRegistrationService));
Diagnostics\AbstractUserDiagnosticTest_GenerateTypeDialog.cs (1)
32.AddParts(
MoveType\AbstractMoveTypeTest.cs (1)
36.AddParts(typeof(MockDiagnosticUpdateSourceRegistrationService));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (13)
Completion\AbstractArgumentProviderTests`1.cs (1)
38=> s_baseComposition.AddParts(GetArgumentProviderType());
Completion\AbstractCompletionProviderTests.cs (1)
90=> s_baseComposition.AddParts(GetCompletionProviderType());
EditorTestCompositions.cs (3)
52.AddParts( 60.AddParts(typeof(TestGlobalOperationNotificationService)) 76.AddParts(
ExtractInterface\ExtractInterfaceTestState.cs (1)
28public static readonly TestComposition Composition = EditorTestCompositions.EditorFeatures.AddParts(
Formatting\CoreFormatterTestsBase.cs (1)
43private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeatures.AddParts(typeof(TestFormattingRuleFactoryServiceFactory));
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (1)
27=> _lazyComposition ??= s_baseComposition.AddParts(GetHighlighterType());
LanguageServer\AbstractLanguageServerProtocolTests.cs (2)
55.AddParts(typeof(TestDocumentTrackingService)) 56.AddParts(typeof(TestWorkspaceRegistrationService));
NavigateTo\AbstractNavigateToTests.cs (2)
43protected static readonly TestComposition FirstVisibleComposition = EditorTestCompositions.EditorFeatures.AddParts(typeof(FirstDocIsVisibleDocumentTrackingService.Factory)); 44protected static readonly TestComposition FirstActiveAndVisibleComposition = EditorTestCompositions.EditorFeatures.AddParts(typeof(FirstDocIsActiveAndVisibleDocumentTrackingService.Factory));
Workspaces\TestWorkspace.cs (1)
131composition = composition.AddParts(typeof(TestWorkspaceConfigurationService));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities2 (3)
Intellisense\TestState.vb (2)
43AddParts( 96composition = composition.AddParts(GetType(FormatCommandHandler))
Utilities\GoToHelpers\GoToTestHelpers.vb (1)
10Public ReadOnly Composition As TestComposition = EditorTestCompositions.EditorFeatures.AddParts(
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (24)
CodeFixes\CodeFixServiceTests.cs (1)
36.AddParts(typeof(MockDiagnosticUpdateSourceRegistrationService));
CodeRefactorings\CodeRefactoringServiceTest.cs (2)
84var composition = FeaturesTestCompositions.Features.AddParts(typeof(TypeScriptCodeRefactoringProvider)); 105composition: EditorTestCompositions.EditorFeatures.AddParts(typeof(T)));
Diagnostics\DiagnosticAnalyzerServiceTests.cs (7)
45.AddParts(typeof(MockDiagnosticUpdateSourceRegistrationService)) 46.AddParts(typeof(TestDocumentTrackingService)); 50.AddParts(typeof(MockDiagnosticUpdateSourceRegistrationService)); 53=> new(s_featuresCompositionWithMockDiagnosticUpdateSourceRegistrationService.AddParts(additionalParts).GetHostServices()); 752using var workspace = TestWorkspace.CreateCSharp("class A {}", composition: s_editorFeaturesCompositionWithMockDiagnosticUpdateSourceRegistrationService.AddParts(typeof(TestDocumentTrackingService))); 874var composition = s_editorFeaturesCompositionWithMockDiagnosticUpdateSourceRegistrationService.AddParts( 983composition: s_editorFeaturesCompositionWithMockDiagnosticUpdateSourceRegistrationService.AddParts(typeof(TestDocumentTrackingService)));
Diagnostics\DiagnosticsSquiggleTaggerProviderTests.cs (1)
37.AddParts(typeof(MockDiagnosticService), typeof(MockDiagnosticAnalyzerService));
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
29.AddParts(typeof(MockDiagnosticUpdateSourceRegistrationService));
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (4)
77var workspace = new TestWorkspace(composition: FeaturesTestCompositions.Features.AddParts(additionalParts), solutionTelemetryId: s_solutionTelemetryId); 87.AddParts( 90.AddParts(additionalParts); 3707var composition = FeaturesTestCompositions.Features.AddParts(typeof(NoCompilationLanguageService));
EditAndContinue\EditSessionActiveStatementsTests.cs (1)
35private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeatures.AddParts(typeof(NoCompilationLanguageService));
EditAndContinue\RemoteEditAndContinueServiceTests.cs (2)
49.AddParts(typeof(MockDiagnosticAnalyzerService), typeof(NoCompilationLanguageService)); 53localComposition = localComposition.AddParts(typeof(MockEditAndContinueWorkspaceService));
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
306.AddParts(typeof(DecompilationMetadataAsSourceFileProvider));
Options\GlobalOptionsTests.cs (1)
151AddParts(typeof(TestGlobalOptions));
SolutionCrawler\WorkCoordinatorTests.cs (3)
1529composition: EditorTestCompositions.EditorFeatures.AddExcludedPartTypes(typeof(IIncrementalAnalyzerProvider)).AddParts(typeof(AnalyzerProviderNoWaitNoBlock)), 1686.AddParts(typeof(TestDocumentTrackingService)) 1693: base(composition: incrementalAnalyzer is null ? s_composition : s_composition.AddParts(incrementalAnalyzer), workspaceKind: workspaceKind, disablePartialSolutions: disablePartialSolutions)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (22)
Classification\ClassificationTests.vb (2)
255Dim composition = EditorTestCompositions.EditorFeatures.AddParts( 318Dim composition = EditorTestCompositions.EditorFeatures.AddParts(
CodeDefinitionWindow\AbstractCodeDefinitionWindowTests.vb (1)
19.AddParts(GetType(MockCodeDefinitionWindowService),
CodeDefinitionWindow\CrossLanguageCodeDefinitionWindowTests.vb (1)
108composition:=AbstractCodeDefinitionWindowTests.TestComposition.AddParts(GetType(FakeGoToDefinitionService)))
CodeFixes\CodeFixServiceTests.vb (1)
30.AddParts(GetType(MockDiagnosticUpdateSourceRegistrationService))
Compilation\CompilationTests.vb (1)
27Dim composition = EditorTestCompositions.EditorFeatures.AddParts(
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (2)
32.AddParts(GetType(MockDiagnosticUpdateSourceRegistrationService), GetType(WorkspaceTestLogger)) 35.AddParts(GetType(TestAddMetadataReferenceCodeActionOperationFactoryWorkspaceService))
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
21.AddParts(GetType(MockDiagnosticUpdateSourceRegistrationService))
Diagnostics\DiagnosticProviderTests.vb (1)
40.AddParts(
Diagnostics\DiagnosticServiceTests.vb (1)
32.AddParts(GetType(MockDiagnosticUpdateSourceRegistrationService))
FindReferences\FindReferencesTests.vb (2)
24Private Shared ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeatures.AddParts( 279Using workspace = TestWorkspace.Create(definition, composition:=s_composition.WithTestHostParts(host).AddParts(GetType(WorkspaceTestLogger)))
IntelliSense\CompletionServiceTests.vb (2)
30Dim composition = EditorTestCompositions.EditorFeatures.AddParts( 98Dim composition = EditorTestCompositions.EditorFeatures.AddParts(GetType(MyRoleProvider))
IntelliSense\CompletionServiceTests_Exclusivitiy.vb (1)
33Dim composition = EditorTestCompositions.EditorFeatures.AddParts(
NavigableSymbols\NavigableSymbolsTest.vb (1)
26Private Shared ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeatures.AddParts(
NavigationBar\NavigationBarControllerTests.vb (1)
315Dim composition = EditorTestCompositions.EditorFeatures.AddParts(
ReferenceHighlighting\AbstractReferenceHighlightingTests.vb (1)
22Private Shared ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeatures.WithTestHostParts(TestHost.OutOfProcess).AddParts(
Rename\RenameEngineResult.vb (1)
60Dim composition = EditorTestCompositions.EditorFeatures.AddParts(
Rename\RenameTestHelpers.vb (1)
26Private ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeaturesWpf.AddParts(
Workspaces\TryFindSourceDefinitionTests.vb (1)
26Dim workspace = TestWorkspace.Create(definition, composition:=EditorTestCompositions.EditorFeatures.AddParts(GetType(WorkspaceTestLogger)))
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (16)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (1)
53protected override TestComposition Composition => base.Composition.AddParts(typeof(MockTypescriptDiagnosticAnalyzer));
Diagnostics\AdditionalFileDiagnosticsTests.cs (1)
128protected override TestComposition Composition => base.Composition.AddParts(typeof(MockAdditionalFileDiagnosticAnalyzer));
Diagnostics\WorkspaceProjectDiagnosticsTests.cs (1)
69protected override TestComposition Composition => base.Composition.AddParts(typeof(MockProjectDiagnosticAnalyzer));
InlineCompletions\InlineCompletionsTests.cs (1)
25.AddParts(typeof(TestSnippetInfoService));
LanguageServerTargetTests.cs (1)
28protected override TestComposition Composition => base.Composition.AddParts(typeof(StatefulLspServiceFactory), typeof(StatelessLspService));
Options\LspOptionsTests.cs (2)
29.AddParts(typeof(TestDocumentTrackingService)) 30.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)
26.AddParts(typeof(TestDocumentTrackingService)) 27.AddParts(typeof(TestWorkspaceRegistrationService));
VSTypeScriptHandlerTests.cs (1)
35protected override TestComposition Composition => base.Composition.AddParts(typeof(TypeScriptHandlerFactory));
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (1)
NamingStylesTests.vb (1)
24Return MyBase.GetComposition().AddParts(GetType(TestSymbolRenamedCodeActionOperationFactoryWorkspaceService))
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (9)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.vb (1)
19.AddParts(GetType(MockDiagnosticUpdateSourceRegistrationService))
Diagnostics\GenerateType\GenerateTypeTests.vb (1)
26.AddParts(GetType(MockDiagnosticUpdateSourceRegistrationService))
Diagnostics\Suppression\SuppressionAllCodeTests.vb (1)
21.AddParts(GetType(MockDiagnosticUpdateSourceRegistrationService))
DocumentationComments\DocumentationCommentTests.vb (1)
20Private Shared ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeatures.AddParts(GetType(CommitConnectionListener))
Formatting\CodeCleanUpTests.vb (1)
511Using workspace = TestWorkspace.CreateVisualBasic(code, composition:=EditorTestCompositions.EditorFeaturesWpf.AddParts(GetType(TCodefix)))
Formatting\Indentation\SmartIndenterTests.vb (1)
21AddParts(GetType(TestFormattingRuleFactoryServiceFactory))
Formatting\VisualBasicFormatterTestBase.vb (1)
24Private Shared ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeatures.AddParts(
MoveStaticMembers\VisualBasicMoveStaticMembersTests.vb (1)
18Private Shared ReadOnly s_testServices As TestComposition = FeaturesTestCompositions.Features.AddParts(GetType(TestMoveStaticMembersService))
NamingStylesTests.vb (1)
24Return MyBase.GetComposition().AddParts(GetType(TestSymbolRenamedCodeActionOperationFactoryWorkspaceService))
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (6)
MEF\ExportProviderCache.cs (1)
27.AddParts(typeof(TestSerializerService.Factory));
MEF\FeaturesTestCompositions.cs (3)
17.AddParts( 24.AddParts(typeof(TestSerializerService.Factory)); 27=> (host == TestHost.InProcess) ? composition : composition.AddAssemblies(typeof(RemoteWorkspacesResources).Assembly).AddParts(typeof(InProcRemoteHostClientProvider.Factory));
Remote\InProcRemoteHostClientProvider.cs (1)
46var hostServices = FeaturesTestCompositions.RemoteHost.AddParts(additionalRemoteParts).GetHostServices();
WorkspaceTestUtilities.cs (1)
14=> new WorkspaceWithPartialSemantics(FeaturesTestCompositions.Features.AddParts(additionalParts).GetHostServices());
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
FindReferencesTests.cs (1)
24=> new AdhocWorkspace(FeaturesTestCompositions.Features.AddParts(additionalParts).GetHostServices());
Formatter\FormatterTests.cs (2)
48var hostServices = s_composition.AddParts(new[] { typeof(NoCompilationLanguageService), typeof(TestFormattingService) }).GetHostServices(); 66var hostServices = s_composition.AddParts(new[] { typeof(NoCompilationLanguageService), typeof(TestFormattingService) }).GetHostServices();
SolutionTests\SolutionTestHelpers.cs (1)
17=> new AdhocWorkspace(FeaturesTestCompositions.Features.AddParts(additionalParts).GetHostServices());
SolutionTests\SolutionTests.cs (1)
3197var hostServices = FeaturesTestCompositions.Features.AddParts(new[]
SyntaxReferenceTests.cs (1)
26=> new AdhocWorkspace(FeaturesTestCompositions.Features.AddParts(additionalParts).GetHostServices());
TestCompositionTests.cs (5)
18var composition1 = FeaturesTestCompositions.Features.AddParts(typeof(TestErrorReportingService), typeof(TestTemporaryStorageServiceFactory)); 19var composition2 = FeaturesTestCompositions.Features.AddParts(typeof(TestTemporaryStorageServiceFactory), 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)
76.AddParts(typeof(TestDocumentTrackingService)) 77.AddParts(typeof(TestWorkspaceRegistrationService))
EditorConfigSettings\Aggregator\SettingsAggregatorTests.cs (1)
21=> new AdhocWorkspace(VisualStudioTestCompositions.LanguageServices.AddParts(additionalParts).GetHostServices(), WorkspaceKind.Host);
Microsoft.VisualStudio.LanguageServices.LiveShare.UnitTests (3)
AbstractLiveShareRequestHandlerTests.cs (3)
25.AddParts(typeof(MockDocumentNavigationServiceFactory)) 26.AddParts(typeof(TestWorkspaceRegistrationService)) 27.AddParts(typeof(TestWorkspaceConfigurationService));
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (6)
CallHierarchy\CallHierarchyTestState.vb (2)
106Dim workspace = TestWorkspace.Create(markup, composition:=VisualStudioTestCompositions.LanguageServices.AddParts(additionalTypes)) 111Dim workspace = TestWorkspace.CreateCSharp(markup, composition:=VisualStudioTestCompositions.LanguageServices.AddParts(additionalTypes))
CodeModel\CodeModelTestHelpers.vb (1)
26Public ReadOnly Composition As TestComposition = VisualStudioTestCompositions.LanguageServices.AddParts(
ProjectSystemShim\Framework\TestEnvironment.vb (2)
57.AddParts( 78Dim composition = s_composition.AddParts(extraParts)
VisualStudioTestCompositions.vb (1)
23AddParts(
Microsoft.VisualStudio.LanguageServices.UnitTests (7)
Diagnostics\DefaultDiagnosticUpdateSourceTests.vb (2)
27.AddParts(GetType(MockDiagnosticUpdateSourceRegistrationService)) 304Dim composition = EditorTestCompositions.EditorFeatures.AddParts(
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (1)
30.AddParts(GetType(MockDiagnosticUpdateSourceRegistrationService))
LanguageBlockTests.vb (1)
247Dim composition = EditorTestCompositions.EditorFeatures.AddParts(
ProjectSystemShim\VisualStudioAnalyzerTests.vb (1)
25.AddParts(GetType(MockDiagnosticUpdateSourceRegistrationService))
Venus\DocumentService_IntegrationTests.vb (2)
42.AddParts(GetType(MockDiagnosticUpdateSourceRegistrationService)) 66Dim composition = EditorTestCompositions.EditorFeatures.AddParts(GetType(MockServiceProvider))
Roslyn.VisualStudio.Next.UnitTests (2)
Remote\SnapshotSerializationTests.cs (1)
51=> new AdhocWorkspace(FeaturesTestCompositions.Features.AddParts(additionalParts).WithTestHostParts(TestHost.OutOfProcess).GetHostServices());
Services\ServiceHubServicesTests.cs (1)
38=> new TestWorkspace(composition: FeaturesTestCompositions.Features.WithTestHostParts(TestHost.OutOfProcess).AddParts(additionalParts));