public async Task GetsAvailableVersionsForFeature()
        {
            // Arrange
            var documentStoreProvider = DocumentStoreProvider;
            await documentStoreProvider.Store.ExecuteIndexAsync(new Features_ByTitleProductAndGroup());

            using (var session = documentStoreProvider.Store.OpenAsyncSession())
            {
                await session.StoreDbFeatureAsync("MyProduct", "MyGroup", "MyFirstFeature", "1.0.0");

                await session.StoreDbFeatureAsync("MyProduct", "MyGroup", "MyFirstFeature", "2.0.0");

                await session.SaveChangesAsync();
            }

            WaitForIndexing(documentStoreProvider.Store);

            // Act
            var sut    = new FeatureManager(documentStoreProvider, configurationManager, logger);
            var result = await sut.GetFeatureAvailableVersions("MyProduct", "MyGroup", "MyFirstFeature");

            // Assert
            result.ShouldNotBeNull();
            result.SequenceEqual(new[] { "2.0.0", "1.0.0" }).ShouldBeTrue();
        }
Beispiel #2
0
        public async Task GetsAvailableVersionsForFeature()
        {
            // Arrange
            var documentStoreProvider = DocumentStoreProvider;

            await documentStoreProvider.StoreDbFeatureAsync("MyProduct", "MyGroup", "MyFirstFeature", "1.0.0");

            await documentStoreProvider.StoreDbFeatureAsync("MyProduct", "MyGroup", "MyFirstFeature", "2.0.0");

            WaitForIndexing(documentStoreProvider.Store);

            // Act
            var sut    = new FeatureManager(documentStoreProvider, logger);
            var result = await sut.GetFeatureAvailableVersions("MyProduct", "MyGroup", "MyFirstFeature");

            // Assert
            result.ShouldNotBeNull();
            result.SequenceEqual(new[] { "2.0.0", "1.0.0" }).ShouldBeTrue();
        }
Beispiel #3
0
 public async Task <IEnumerable <string> > GetFeatureVersions(string productName, string groupName, string featureTitle)
 {
     return(await _featureManager.GetFeatureAvailableVersions(productName, groupName, featureTitle));
 }