protected override void Arrange() { base.Arrange(); var locator = new Mock<ConfigurationSectionLocator>(); locator.Setup(x => x.ConfigurationSectionNames).Returns(new[] { "testSection" }); Container.RegisterInstance(locator.Object); var section = new SectionWithCollectionProperties() { Children = {new ChildConfigurationElement() {Name = "AChild"}} }; sectionViewModel = SectionViewModel.CreateSection(Container, "testSection", section); }
protected override void Arrange() { base.Arrange(); var locator = new Mock <ConfigurationSectionLocator>(); locator.Setup(x => x.ConfigurationSectionNames).Returns(new[] { "testSection" }); Container.RegisterInstance(locator.Object); var section = new SectionWithCollectionProperties() { Children = { new ChildConfigurationElement() { Name = "AChild" } } }; sectionViewModel = SectionViewModel.CreateSection(Container, "testSection", section); }