private static IComponentStore ComponentStoreFactory(IServiceProvider serviceProvider) { if (componentStore == null) { componentStore = serviceProvider.GetService <GoofyInMemoryComponentStore>(); } return(componentStore); }
public void ShouldPersistComponentStore() { _componentStore.AddComponent(new Component { FullName = "component1", Installed = false }); _componentStore.AddComponent(new Component { FullName = "component2", Installed = true }); _componentStore.AddComponent(new Component { FullName = "component3", Installed = false }); var anotherComponentStoreManager = new GoofyInMemoryComponentStoreManager(new MockComponentDirectoryPathProvider()); var anotherComponentStore = new GoofyInMemoryComponentStore(anotherComponentStoreManager); anotherComponentStoreManager.StartStore(anotherComponentStore); Assert.Equal(3, anotherComponentStore.Components.Count()); }
public GoofyInMemoryComponentStoreTest() { _componentStore = new GoofyInMemoryComponentStore(new FakeComponentStorePersist()); }
public GoofyInMemoryComponentStoreManagerTest() { _sut = new GoofyInMemoryComponentStoreManager(new MockComponentDirectoryPathProvider()); _componentStore = new GoofyInMemoryComponentStore(_sut); }