4 instantiations of TestComposition
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (4)
MEF\TestComposition.cs (4)
23public static readonly TestComposition Empty = new TestComposition(ImmutableHashSet<Assembly>.Empty, ImmutableHashSet<Type>.Empty, ImmutableHashSet<Type>.Empty); 185return new TestComposition(assemblies, Parts, ExcludedPartTypes); 198=> (parts == Parts) ? this : new TestComposition(Assemblies, parts, ExcludedPartTypes); 201=> (excludedPartTypes == ExcludedPartTypes) ? this : new TestComposition(Assemblies, Parts, excludedPartTypes);
239 references to TestComposition
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (3)
AbstractCodeActionOrUserDiagnosticTest.cs (3)
143protected virtual TestComposition GetComposition() 159var composition = GetComposition().WithTestHostParts(parameters.testHost); 664private static async Task VerifyAgainstWorkspaceDefinitionAsync(string expectedText, Solution newSolution, TestComposition composition)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
NamingStylesTests.cs (1)
36protected override TestComposition GetComposition()
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (32)
Classification\AbstractCSharpClassifierTests.cs (1)
20var composition = EditorTestCompositions.EditorFeatures.WithTestHostParts(testHost);
CodeActions\Preview\PreviewTests.cs (2)
30private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeaturesWpf 43protected override TestComposition GetComposition() => s_composition;
CommentSelection\CSharpToggleBlockCommentCommandHandlerTests.cs (1)
236internal override TestWorkspace GetWorkspace(string markup, TestComposition composition)
CommentSelection\CSharpToggleLineCommentCommandHandlerTests.cs (1)
1061internal override TestWorkspace GetWorkspace(string markup, TestComposition composition)
Completion\CompletionProviders\SnippetCompletionProviderTests.cs (1)
32protected override TestComposition GetComposition()
ConvertNamespace\ConvertNamespaceCommandHandlerTests.cs (1)
23private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeaturesWpf.AddParts(
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
35private static readonly TestComposition s_compositionWithMockDiagnosticUpdateSourceRegistrationService = EditorTestCompositions.EditorFeatures
Diagnostics\GenerateType\GenerateTypeTests.cs (1)
41protected override TestComposition GetComposition()
Diagnostics\Suppression\SuppressionAllCodeTests.cs (1)
26private static readonly TestComposition s_compositionWithMockDiagnosticUpdateSourceRegistrationService = EditorTestCompositions.EditorFeatures
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
34private static readonly TestComposition s_composition = FeaturesTestCompositions.Features;
EventHookup\EventHookupTestState.cs (1)
25private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeaturesWpf.AddParts(
Formatting\Indentation\CSharpFormatterTestsBase.cs (1)
38private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeatures.AddParts(typeof(TestFormattingRuleFactoryServiceFactory));
Formatting\Indentation\SmartIndenterTests.cs (1)
29private static readonly TestComposition s_compositionWithTestFormattingRules = EditorTestCompositions.EditorFeatures
Formatting\RazorLineFormattingOptionsTests.cs (1)
23private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeatures;
GenerateFromMembers\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (1)
34private static readonly TestComposition s_composition =
Interactive\NavigateTo\InteractiveNavigateToTests.cs (1)
27protected override TestWorkspace CreateWorkspace(string content, TestComposition composition)
MoveStaticMembers\CSharpMoveStaticMembersTests.cs (1)
22private static readonly TestComposition s_testServices = FeaturesTestCompositions.Features.AddParts(typeof(TestMoveStaticMembersService));
MoveToNamespace\MoveToNamespaceTests.cs (3)
30private static readonly TestComposition s_compositionWithoutOptions = FeaturesTestCompositions.Features 36private static readonly TestComposition s_composition = s_compositionWithoutOptions.AddParts( 39protected override TestComposition GetComposition() => s_composition;
NamingStylesTests.cs (1)
36protected override TestComposition GetComposition()
NavigateTo\NavigateToTests.cs (1)
31protected override TestWorkspace CreateWorkspace(string content, TestComposition composition)
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
231protected static TestComposition GetTestComposition()
RawStringLiteral\RawStringLiteralCommandHandlerTests.cs (1)
21private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeaturesWpf.AddParts(
Squiggles\ErrorSquiggleProducerTests.cs (1)
297private static readonly TestComposition s_mockComposition = EditorTestCompositions.EditorFeatures
StringCopyPaste\StringCopyPasteCommandHandlerTests.cs (2)
34private static readonly TestComposition s_composition = 38private static readonly TestComposition s_compositionWithMockCopyPasteService =
TaskList\CSharpTaskListTests.cs (1)
17protected override TestWorkspace CreateWorkspace(string codeWithMarker, TestComposition composition)
TaskList\NoCompilationTaskListTests.cs (1)
28protected override TestWorkspace CreateWorkspace(string codeWithMarker, TestComposition composition)
Workspaces\WorkspaceTests_EditorFeatures.cs (2)
39TestComposition composition = null) 565var composition = EditorTestCompositions.EditorFeatures.AddParts(typeof(TestDocumentTrackingService));
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (9)
ChangeSignature\AbstractChangeSignatureTests.cs (1)
29protected override TestComposition GetComposition()
ChangeSignature\ChangeSignatureTestState.cs (1)
30private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeatures.AddParts(typeof(TestChangeSignatureOptionsService));
CodeActions\AbstractCodeActionOrUserDiagnosticTest.cs (3)
143protected virtual TestComposition GetComposition() 159var composition = GetComposition().WithTestHostParts(parameters.testHost); 664private static async Task VerifyAgainstWorkspaceDefinitionAsync(string expectedText, Solution newSolution, TestComposition composition)
CodeActions\CSharpCodeRefactoringVerifier`1+Test.cs (1)
125private static readonly TestComposition s_editorFeaturesOOPComposition = EditorTestCompositions.EditorFeatures.WithTestHostParts(TestHost.OutOfProcess);
CodeActions\VisualBasicCodeRefactoringVerifier`1+Test.cs (1)
111private static readonly TestComposition s_editorFeaturesOOPComposition = EditorTestCompositions.EditorFeatures.WithTestHostParts(TestHost.OutOfProcess);
Diagnostics\AbstractUserDiagnosticTest_GenerateTypeDialog.cs (1)
30private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeaturesWpf
MoveType\AbstractMoveTypeTest.cs (1)
33protected override TestComposition GetComposition()
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (54)
AbstractCommandHandlerTestState.cs (1)
60TestComposition composition,
CommentSelection\AbstractToggleCommentTestBase.cs (1)
31internal abstract TestWorkspace GetWorkspace(string markup, TestComposition composition);
Completion\AbstractArgumentProviderTests`1.cs (2)
28private static readonly TestComposition s_baseComposition = EditorTestCompositions.EditorFeatures.AddExcludedPartTypes(typeof(ArgumentProvider)); 37protected virtual TestComposition GetComposition()
Completion\AbstractCompletionProviderTests.cs (2)
43private static readonly TestComposition s_baseComposition = EditorTestCompositions.EditorFeatures.AddExcludedPartTypes(typeof(CompletionProvider)); 89protected virtual TestComposition GetComposition()
EditorTestCompositions.cs (7)
22public static readonly TestComposition Editor = TestComposition.Empty 59public static readonly TestComposition EditorFeatures = FeaturesTestCompositions.Features 69public static readonly TestComposition EditorFeaturesWpf = EditorFeatures 73public static readonly TestComposition InteractiveWindow = EditorFeaturesWpf 79public static readonly TestComposition LanguageServerProtocol = FeaturesTestCompositions.Features 82public static readonly TestComposition LanguageServerProtocolEditorFeatures = EditorFeatures
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 (3)
23private static readonly TestComposition s_baseComposition = EditorTestCompositions.EditorFeatures.AddExcludedPartTypes(typeof(IHighlighter)); 24private TestComposition _lazyComposition; 26protected TestComposition Composition
LanguageServer\AbstractLanguageServerProtocolTests.cs (2)
54private static readonly TestComposition s_composition = EditorTestCompositions.LanguageServerProtocolEditorFeatures 107protected virtual TestComposition Composition => s_composition;
NavigateTo\AbstractNavigateToTests.cs (10)
42protected static readonly TestComposition DefaultComposition = EditorTestCompositions.EditorFeatures; 43protected static readonly TestComposition FirstVisibleComposition = EditorTestCompositions.EditorFeatures.AddParts(typeof(FirstDocIsVisibleDocumentTrackingService.Factory)); 44protected static readonly TestComposition FirstActiveAndVisibleComposition = EditorTestCompositions.EditorFeatures.AddParts(typeof(FirstDocIsActiveAndVisibleDocumentTrackingService.Factory)); 69protected abstract TestWorkspace CreateWorkspace(string content, TestComposition composition); 88var testComposition = composition switch 101var testComposition = composition switch 114TestComposition composition) 122TestComposition composition) 131TestComposition composition) 143TestComposition composition)
Squiggles\SquiggleUtilities.cs (2)
25internal static TestComposition CompositionWithSolutionCrawler = EditorTestCompositions.EditorFeatures 28internal static TestComposition WpfCompositionWithSolutionCrawler = EditorTestCompositions.EditorFeaturesWpf
TaskList\AbstractTaskListTests.cs (3)
21private static readonly TestComposition s_inProcessComposition = EditorTestCompositions.EditorFeatures; 22private static readonly TestComposition s_outOffProcessComposition = s_inProcessComposition.WithTestHostParts(TestHost.OutOfProcess); 27protected abstract TestWorkspace CreateWorkspace(string codeWithMarker, TestComposition testComposition);
Workspaces\CSharpTestWorkspaceFixture.cs (1)
16protected override TestWorkspace CreateWorkspace(TestComposition composition = null)
Workspaces\InteractiveCSharpTestWorkspaceFixture.cs (2)
16internal static TestWorkspace CreateInteractiveWorkspace(string fileContent, TestComposition composition) 29protected override TestWorkspace CreateWorkspace(TestComposition composition = null)
Workspaces\TestWorkspace.cs (3)
41public TestComposition? Composition { get; } 64TestComposition? composition = null, 125private static HostServices GetHostServices([NotNull] ref TestComposition? composition, bool hasWorkspaceConfigurationOptions)
Workspaces\TestWorkspace_Create.cs (6)
130TestComposition composition = null, 147TestComposition composition) 184TestComposition composition = null, 197TestComposition composition = null, 213TestComposition composition = null, 225TestComposition composition = null,
Workspaces\TestWorkspace_XmlConsumption.cs (3)
61public static TestWorkspace Create(string xmlDefinition, bool openDocuments = false, TestComposition composition = null) 67TestComposition composition = null, 76TestComposition composition = null,
Workspaces\TestWorkspaceFixture.cs (3)
29public TestWorkspace GetWorkspace(TestComposition composition = null) 35public TestWorkspace GetWorkspace(string markup, TestComposition composition = null, string workspaceKind = null) 60protected abstract TestWorkspace CreateWorkspace(TestComposition composition);
Workspaces\VisualBasicTestWorkspaceFixture.cs (1)
20protected override TestWorkspace CreateWorkspace(TestComposition composition = null)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities2 (3)
Intellisense\TestState.vb (2)
39Public Shared ReadOnly CompositionWithoutCompletionTestParts As TestComposition = EditorTestCompositions.EditorFeaturesWpf. 89includeFormatCommandHandler As Boolean) As TestComposition
Utilities\GoToHelpers\GoToTestHelpers.vb (1)
10Public ReadOnly Composition As TestComposition = EditorTestCompositions.EditorFeatures.AddParts(
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (25)
CodeFixes\CodeFixServiceTests.cs (1)
34private static readonly TestComposition s_compositionWithMockDiagnosticUpdateSourceRegistrationService = EditorTestCompositions.EditorFeatures
CodeRefactorings\CodeRefactoringServiceTest.cs (1)
84var composition = FeaturesTestCompositions.Features.AddParts(typeof(TypeScriptCodeRefactoringProvider));
CommentSelection\ToggleBlockCommentCommandHandlerTests.cs (1)
1509internal override TestWorkspace GetWorkspace(string markup, TestComposition composition)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (3)
43private static readonly TestComposition s_featuresCompositionWithMockDiagnosticUpdateSourceRegistrationService = EditorTestCompositions.EditorFeatures 48private static readonly TestComposition s_editorFeaturesCompositionWithMockDiagnosticUpdateSourceRegistrationService = EditorTestCompositions.EditorFeatures 874var composition = s_editorFeaturesCompositionWithMockDiagnosticUpdateSourceRegistrationService.AddParts(
Diagnostics\DiagnosticsSquiggleTaggerProviderTests.cs (1)
34private static readonly TestComposition s_compositionWithMockDiagnosticService =
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
27private static readonly TestComposition s_compositionWithMockDiagnosticUpdateSourceRegistrationService = EditorTestCompositions.EditorFeatures
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (2)
85var composition = EditorTestCompositions.EditorFeatures 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 (1)
47var localComposition = EditorTestCompositions.EditorFeatures.WithTestHostParts(testHost)
Extensions\IProjectionBufferFactoryServiceExtensionsTests.cs (2)
53var composition = EditorTestCompositions.EditorFeatures; 83var composition = EditorTestCompositions.EditorFeatures;
InheritanceMargin\InheritanceMarginTests.cs (2)
27private static readonly TestComposition s_inProcessComposition = EditorTestCompositions.EditorFeatures; 28private static readonly TestComposition s_outOffProcessComposition = s_inProcessComposition.WithTestHostParts(TestHost.OutOfProcess);
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
304var composition = EditorTestCompositions.EditorFeatures
Options\GlobalOptionsTests.cs (1)
149var composition = EditorTestCompositions.LanguageServerProtocolEditorFeatures.
Preview\PreviewWorkspaceTests.cs (1)
250var composition = EditorTestCompositions.EditorFeatures;
SolutionCrawler\WorkCoordinatorTests.cs (1)
1685private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeatures
SymbolFinder\DependentTypeFinderTests.cs (2)
45var composition = EditorTestCompositions.EditorFeatures.WithTestHostParts(host); 621var composition = EditorTestCompositions.EditorFeatures.WithTestHostParts(host);
ValueTracking\AbstractBaseValueTrackingTests.cs (1)
25protected abstract TestWorkspace CreateWorkspace(string code, TestComposition composition);
ValueTracking\CSharpValueTrackingTests.cs (1)
17protected override TestWorkspace CreateWorkspace(string code, TestComposition composition)
ValueTracking\VisualBasicValueTrackingTests.cs (1)
17protected override TestWorkspace CreateWorkspace(string code, TestComposition composition)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (19)
CodeDefinitionWindow\AbstractCodeDefinitionWindowTests.vb (2)
17Public Shared ReadOnly TestComposition As TestComposition = 42Protected MustOverride Function CreateWorkspace(code As String, testComposition As TestComposition) As TestWorkspace
CodeDefinitionWindow\CSharpCodeDefinitionWindowTests.vb (1)
98Protected Overrides Function CreateWorkspace(code As String, testComposition As TestComposition) As TestWorkspace
CodeDefinitionWindow\VisualBasicCodeDefinitionWindowTests.vb (1)
80Protected Overrides Function CreateWorkspace(code As String, testComposition As TestComposition) As TestWorkspace
CodeFixes\CodeFixServiceTests.vb (1)
28Private Shared ReadOnly s_compositionWithMockDiagnosticUpdateSourceRegistrationService As TestComposition = EditorTestCompositions.EditorFeatures _
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (2)
30Private Shared ReadOnly s_compositionWithMockDiagnosticUpdateSourceRegistrationService As TestComposition = EditorTestCompositions.EditorFeatures _ 34Private Shared ReadOnly s_composition As TestComposition = s_compositionWithMockDiagnosticUpdateSourceRegistrationService _
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
19Private Shared ReadOnly s_compositionWithMockDiagnosticUpdateSourceRegistrationService As TestComposition = EditorTestCompositions.EditorFeatures _
Diagnostics\DiagnosticProviderTests.vb (1)
38Private Shared ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeatures _
Diagnostics\DiagnosticServiceTests.vb (1)
30Private Shared ReadOnly s_compositionWithMockDiagnosticUpdateSourceRegistrationService As TestComposition = EditorTestCompositions.EditorFeatures _
FindReferences\FindReferencesTests.vb (1)
24Private Shared ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeatures.AddParts(
NavigableSymbols\NavigableSymbolsTest.vb (1)
26Private Shared ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeatures.AddParts(
NavigationBar\TestHelpers.vb (2)
22Private ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeatures 23Private ReadOnly s_oopComposition As TestComposition = s_composition.WithTestHostParts(Remote.Testing.TestHost.OutOfProcess)
PasteTracking\PasteTrackingTestState.vb (1)
24Public Sub New(workspaceElement As XElement, Optional composition As TestComposition = Nothing)
ReferenceHighlighting\AbstractReferenceHighlightingTests.vb (1)
22Private Shared ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeatures.WithTestHostParts(TestHost.OutOfProcess).AddParts(
Rename\RenameTestHelpers.vb (1)
26Private ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeaturesWpf.AddParts(
UnitTesting\UnitTestingSearchHelpersTests.vb (2)
12Private Shared ReadOnly s_inProcessComposition As TestComposition = EditorTestCompositions.EditorFeatures 13Private Shared ReadOnly s_outOffProcessComposition As TestComposition = s_inProcessComposition.WithTestHostParts(TestHost.OutOfProcess)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (9)
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)
24protected override TestComposition Composition => base.Composition
LanguageServerTargetTests.cs (1)
28protected override TestComposition Composition => base.Composition.AddParts(typeof(StatefulLspServiceFactory), typeof(StatelessLspService));
Options\LspOptionsTests.cs (1)
28protected override TestComposition Composition => EditorTestCompositions.LanguageServerProtocol
Ordering\RequestOrderingTests.cs (1)
26protected override TestComposition Composition => base.Composition
References\FindAllReferencesHandlerFeaturesTests.cs (1)
25protected override TestComposition Composition => EditorTestCompositions.LanguageServerProtocol
VSTypeScriptHandlerTests.cs (1)
35protected override TestComposition Composition => base.Composition.AddParts(typeof(TypeScriptHandlerFactory));
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.UnitTests (2)
Utilities\TestLsifOutput.vb (2)
24Public Shared ReadOnly TestComposition As TestComposition = TestComposition.Empty.AddAssemblies(Composition.MefCompositionAssemblies)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (1)
NamingStylesTests.vb (1)
23Protected Overrides Function GetComposition() As TestComposition
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (12)
CommentSelection\VisualBasicToggleLineCommentTests.vb (1)
122Friend Overrides Function GetWorkspace(markup As String, composition As TestComposition) As TestWorkspace
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.vb (1)
17Private Shared ReadOnly s_compositionWithMockDiagnosticUpdateSourceRegistrationService As TestComposition = EditorTestCompositions.EditorFeatures _
Diagnostics\GenerateType\GenerateTypeTests.vb (1)
23Protected Overrides Function GetComposition() As TestComposition
Diagnostics\Suppression\SuppressionAllCodeTests.vb (1)
19Private Shared ReadOnly s_compositionWithMockDiagnosticUpdateSourceRegistrationService As TestComposition = EditorTestCompositions.EditorFeatures _
DocumentationComments\DocumentationCommentTests.vb (1)
20Private Shared ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeatures.AddParts(GetType(CommitConnectionListener))
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (1)
22Private Shared ReadOnly s_composition As TestComposition =
Formatting\Indentation\SmartIndenterTests.vb (1)
20Private Shared ReadOnly s_compositionWithTestFormattingRules As TestComposition = EditorTestCompositions.EditorFeatures.
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)
23Protected Overrides Function GetComposition() As TestComposition
NavigateTo\NavigateToTests.vb (1)
25Protected Overrides Function CreateWorkspace(content As String, composition As TestComposition) As TestWorkspace
TaskList\VisualBasicTaskListTests.vb (1)
15Protected Overrides Function CreateWorkspace(codeWithMarker As String, composition As TestComposition) As TestWorkspace
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (28)
MEF\ExportProviderCache.cs (2)
25private static readonly TestComposition s_defaultHostExportProviderComposition = TestComposition.Empty
MEF\FeaturesTestCompositions.cs (6)
15public static readonly TestComposition Features = TestComposition.Empty 22public static readonly TestComposition RemoteHost = TestComposition.Empty 26public static TestComposition WithTestHostParts(this TestComposition composition, TestHost host)
MEF\TestComposition.cs (20)
23public static readonly TestComposition Empty = new TestComposition(ImmutableHashSet<Assembly>.Empty, ImmutableHashSet<Type>.Empty, ImmutableHashSet<Type>.Empty); 133public TestComposition Add(TestComposition composition) 136public TestComposition AddAssemblies(params Assembly[]? assemblies) 139public TestComposition AddAssemblies(IEnumerable<Assembly>? assemblies) 142public TestComposition AddParts(IEnumerable<Type>? types) 145public TestComposition AddParts(params Type[]? types) 148public TestComposition AddExcludedPartTypes(IEnumerable<Type>? types) 151public TestComposition AddExcludedPartTypes(params Type[]? types) 154public TestComposition Remove(TestComposition composition) 157public TestComposition RemoveAssemblies(params Assembly[]? assemblies) 160public TestComposition RemoveAssemblies(IEnumerable<Assembly>? assemblies) 163public TestComposition RemoveParts(IEnumerable<Type>? types) 166public TestComposition RemoveParts(params Type[]? types) 169public TestComposition RemoveExcludedPartTypes(IEnumerable<Type>? types) 172public TestComposition RemoveExcludedPartTypes(params Type[]? types) 175public TestComposition WithAssemblies(ImmutableHashSet<Assembly> assemblies) 197public TestComposition WithParts(ImmutableHashSet<Type> parts) 200public TestComposition WithExcludedPartTypes(ImmutableHashSet<Type> excludedPartTypes)
Microsoft.CodeAnalysis.Workspaces.UnitTests (27)
FindAllDeclarationsTests.TestSolutionsAndProject.cs (1)
79var composition = FeaturesTestCompositions.Features.WithTestHostParts(testHost);
Formatter\FormatterTests.cs (1)
30private static readonly TestComposition s_composition = FeaturesTestCompositions.Features;
TestCompositionTests.cs (22)
18var composition1 = FeaturesTestCompositions.Features.AddParts(typeof(TestErrorReportingService), typeof(TestTemporaryStorageServiceFactory)); 19var composition2 = FeaturesTestCompositions.Features.AddParts(typeof(TestTemporaryStorageServiceFactory), typeof(TestErrorReportingService)); 29var composition1 = TestComposition.Empty; 30var composition2 = composition1.AddAssemblies(assembly1); 34var composition3 = composition2.WithAssemblies(ImmutableHashSet.Create(assembly2)); 44var composition1 = TestComposition.Empty; 45var composition2 = composition1.AddParts(type1); 46var composition3 = composition2.RemoveParts(type1); 52var composition4 = composition2.WithParts(ImmutableHashSet.Create(type2)); 63var composition1 = TestComposition.Empty; 64var composition2 = composition1.AddExcludedPartTypes(type1); 65var composition3 = composition2.RemoveExcludedPartTypes(type1); 73var composition4 = composition2.WithExcludedPartTypes(ImmutableHashSet.Create(type2)); 88var composition1 = TestComposition.Empty.AddAssemblies(assembly1).AddParts(type1).AddExcludedPartTypes(excluded1); 89var composition2 = TestComposition.Empty.AddAssemblies(assembly2).AddParts(type1, type2).AddExcludedPartTypes(excluded2); 90var composition3 = composition1.Add(composition2); 96var composition4 = composition3.Remove(composition1);
WorkspaceTests\AdhocWorkspaceTests.cs (1)
607var composition = FeaturesTestCompositions.Features;
WorkspaceTests\DynamicFileInfoProviderMefTests.cs (2)
49var composition = TestComposition.Empty.AddParts(typeof(TestDynamicFileInfoProviderThatProducesNoFiles));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
DocumentOutline\DocumentOutlineTestsBase.cs (1)
75private static readonly TestComposition s_composition = EditorTestCompositions.LanguageServerProtocolEditorFeatures
Microsoft.VisualStudio.LanguageServices.LiveShare.UnitTests (3)
AbstractLiveShareRequestHandlerTests.cs (2)
24private static readonly TestComposition s_composition = LiveShareTestCompositions.Features 54protected override TestComposition Composition => s_composition;
LiveShareTestCompositions.cs (1)
14public static readonly TestComposition Features = EditorTestCompositions.LanguageServerProtocol
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (3)
CodeModel\CodeModelTestHelpers.vb (1)
26Public ReadOnly Composition As TestComposition = VisualStudioTestCompositions.LanguageServices.AddParts(
ProjectSystemShim\Framework\TestEnvironment.vb (1)
55Private Shared ReadOnly s_composition As TestComposition = EditorTestCompositions.EditorFeaturesWpf _
VisualStudioTestCompositions.vb (1)
18Public Shared ReadOnly LanguageServices As TestComposition = EditorTestCompositions.EditorFeaturesWpf.
Microsoft.VisualStudio.LanguageServices.UnitTests (5)
Diagnostics\DefaultDiagnosticUpdateSourceTests.vb (1)
25Private Shared ReadOnly s_compositionWithMockDiagnosticUpdateSourceRegistrationService As TestComposition = EditorTestCompositions.EditorFeatures _
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (1)
28Private Shared ReadOnly s_compositionWithMockDiagnosticUpdateSourceRegistrationService As TestComposition = EditorTestCompositions.EditorFeatures _
Preview\PreviewChangesTests.vb (1)
19Private Shared ReadOnly s_composition As TestComposition = VisualStudioTestCompositions.LanguageServices
ProjectSystemShim\VisualStudioAnalyzerTests.vb (1)
23Private Shared ReadOnly s_compositionWithMockDiagnosticUpdateSourceRegistrationService As TestComposition = EditorTestCompositions.EditorFeatures _
Venus\DocumentService_IntegrationTests.vb (1)
40Private Shared ReadOnly s_compositionWithMockDiagnosticUpdateSourceRegistrationService As TestComposition = EditorTestCompositions.EditorFeatures _
Roslyn.VisualStudio.Next.UnitTests (2)
Remote\RemoteHostClientServiceFactoryTests.cs (1)
30private static readonly TestComposition s_composition = FeaturesTestCompositions.Features.WithTestHostParts(TestHost.OutOfProcess);
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (1)
269var composition = EditorTestCompositions.EditorFeatures.WithTestHostParts(TestHost.OutOfProcess);