Exemple #1
0
 /// <summary>
 ///   Initializes a new instance of the <see cref = "FeatureStoreService" /> class.
 /// </summary>
 public FeatureStoreService()
     : this(
         StorageContainerFactory.Create(
             (StorageContainerConfigurationSection)
             ConfigurationManager.GetSection(StorageConfigurationSectionName)))
 {
 }
        private static void CreateAndAssert(string configSectionName, string expectedContainerTypeKey,
                                            string expectedStorageLocation, Type expectedImplementationType)
        {
            StorageContainerConfigurationSection storageContainerConfigurationSection =
                (StorageContainerConfigurationSection)ConfigurationManager.GetSection(configSectionName);

            Assert.AreEqual(expectedContainerTypeKey, storageContainerConfigurationSection.ContainerTypeKey);
            Assert.AreEqual(expectedStorageLocation, storageContainerConfigurationSection.StorageLocation);

            IStorageContainer storageContainer = StorageContainerFactory.Create(storageContainerConfigurationSection);

            Assert.IsInstanceOfType(storageContainer, expectedImplementationType);
        }