public SerializationServiceTests()
 {
     HostMock = new Mock<IProtocolEndpoint>();
     ServiceProvider = ExtensionServiceProvider.CreateDefaultServiceProvider();
     HostLoader.InitializeHostedServices(ServiceProvider, HostMock.Object);
     SerializationService = ServiceProvider.GetService<SerializationService>();
 }
Пример #2
0
 public FormatterUnitTestsBase()
 {
     HostMock             = new Mock <IProtocolEndpoint>();
     WorkspaceServiceMock = new Mock <WorkspaceService <SqlToolsSettings> >();
     ServiceProvider      = ExtensionServiceProvider.CreateDefaultServiceProvider();
     ServiceProvider.RegisterSingleService(WorkspaceServiceMock.Object);
     HostLoader.InitializeHostedServices(ServiceProvider, HostMock.Object);
     FormatterService = ServiceProvider.GetService <TSqlFormatterService>();
 }
Пример #3
0
 public ResourceProviderServiceTests()
 {
     HostMock = new Mock <IProtocolEndpoint>();
     AuthenticationManagerMock = new Mock <IAzureAuthenticationManager>();
     ResourceManagerMock       = new Mock <IAzureResourceManager>();
     ServiceProvider           = ExtensionServiceProvider.CreateFromAssembliesInDirectory(ResourceProviderHostLoader.GetResourceProviderExtensionDlls());
     ServiceProvider.RegisterSingleService <IAzureAuthenticationManager>(AuthenticationManagerMock.Object);
     ServiceProvider.RegisterSingleService <IAzureResourceManager>(ResourceManagerMock.Object);
     HostLoader.InitializeHostedServices(ServiceProvider, HostMock.Object);
     ResourceProviderService = ServiceProvider.GetService <ResourceProviderService>();
 }