protected override void Arrange() { base.Arrange(); testreferencingSection = new TestReferencingSection(); var locator = new Mock<ConfigurationSectionLocator>(); locator.Setup(x => x.ConfigurationSectionNames).Returns(new string[] {"testReferencingSection"}); Container.RegisterInstance(locator.Object); DesignDictionaryConfigurationSource source = new DesignDictionaryConfigurationSource(); source.Add("testReferencingSection", testreferencingSection); configSource = Container.Resolve<ConfigurationSourceModel>(); configSource.Load(source); section = configSource.Sections.Where(x => x.SectionName == "testReferencingSection").Single(); section.Property("ReferencingProperty").Value = "ReferringTo"; }
protected override void Arrange() { base.Arrange(); testreferencingSection = new TestReferencingSection(); var locator = new Mock <ConfigurationSectionLocator>(); locator.Setup(x => x.ConfigurationSectionNames).Returns(new string[] { "testReferencingSection" }); Container.RegisterInstance(locator.Object); DesignDictionaryConfigurationSource source = new DesignDictionaryConfigurationSource(); source.Add("testReferencingSection", testreferencingSection); configSource = Container.Resolve <ConfigurationSourceModel>(); configSource.Load(source); section = configSource.Sections.Where(x => x.SectionName == "testReferencingSection").Single(); section.Property("ReferencingProperty").Value = "ReferringTo"; }