Beispiel #1
0
        protected override void Act()
        {
            var cacheManagersCollection  = CacheSectionViewModel.GetDescendentsOfType <NameTypeConfigurationElementCollection <CacheStorageData, CustomCacheStorageData> >().First();
            var cacheManagerBackingStore = ((ElementCollectionViewModel)cacheManagersCollection).AddNewCollectionElement(typeof(IsolatedStorageCacheStorageData));

            cacheManagerBackingStore.NameProperty.Value = "backing store";
        }
        protected override void Arrange()
        {
            base.Arrange();

            var source = new DesignDictionaryConfigurationSource();

            new TestConfigurationBuilder().AddCachingSettings().Build(source);

            var sourceModel = this.Container.Resolve <ConfigurationSourceModel>();

            sourceModel.Load(source);

            CacheSectionViewModel =
                sourceModel.Sections.Where(x => x.ConfigurationType == typeof(CacheManagerSettings)).Single();

            CacheManager = CacheSectionViewModel.GetDescendentsOfType <CacheManagerData>().FirstOrDefault();
        }