public async Task CanGetAllDbFeatures() { // Arrange var documentStoreProvider = DocumentStoreProvider; await documentStoreProvider.StoreDbFeatureAsync("MyProduct", "MyGroup", "MyFirstFeature", "0.0.0"); await documentStoreProvider.StoreDbFeatureAsync("MyOtherProduct", "MyOtherGroup", "MySecondFeature", "0.0.0"); WaitForIndexing(documentStoreProvider.Store); // Act var sut = new FeatureManager(documentStoreProvider, logger); var result = await sut.GetAllDbFeatures(); // Assert result.ShouldNotBeNull(); result.FirstOrDefault().Title.ShouldBe("MyFirstFeature"); result.LastOrDefault().Title.ShouldBe("MySecondFeature"); }
public async Task CanGetAllDbFeatures() { // Arrange var documentStoreProvider = DocumentStoreProvider; using (var session = documentStoreProvider.Store.OpenAsyncSession()) { await session.StoreDbFeatureAsync("MyProduct", "MyGroup", "MyFirstFeature", "0.0.0"); await session.StoreDbFeatureAsync("MyOtherProduct", "MyOtherGroup", "MySecondFeature", "0.0.0"); await session.SaveChangesAsync(); } // Act var sut = new FeatureManager(documentStoreProvider, configurationManager, logger); var result = await sut.GetAllDbFeatures(); // Assert result.ShouldNotBeNull(); result.FirstOrDefault().Title.ShouldBe("MyFirstFeature"); result.LastOrDefault().Title.ShouldBe("MySecondFeature"); }