mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-31 09:35:39 -05:00
Fix MEF loader issues with framework assemblies (#253)
This is fixing a crashing bug in previous check-in so I'm pushing in. Please leave comments on the commit and email if there is feedback. * Fix MEF loader issues with framework assemblies * Fix broken test from changed behavior * Fix braces to C# convention
This commit is contained in:
@@ -42,12 +42,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Extensibility
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CreateDefaultServiceProviderShouldFindTypesInAllAssemblies()
|
||||
public void CreateDefaultServiceProviderShouldFindTypesInAllKnownAssemblies()
|
||||
{
|
||||
// Given a default ExtensionServiceProvider
|
||||
// Then should not find exports from a different assembly
|
||||
// Then we should not find exports from a test assembly
|
||||
ExtensionServiceProvider serviceProvider = ExtensionServiceProvider.CreateDefaultServiceProvider();
|
||||
Assert.NotEmpty(serviceProvider.GetServices<MyExportType>());
|
||||
Assert.Empty(serviceProvider.GetServices<MyExportType>());
|
||||
|
||||
// But should find exports that are defined in the main assembly
|
||||
Assert.NotEmpty(serviceProvider.GetServices<ASTNodeFormatterFactory>());
|
||||
|
||||
Reference in New Issue
Block a user