protected override void Arrange() { base.Arrange(); configurationSourceModel = Container.Resolve<ConfigurationSourceModel>(); configurationSourceModel.AddSection(LoggingSettings.SectionName, new LoggingSettings()); }
protected override void Act() { configurationSourceModel = Container.Resolve<ConfigurationSourceModel>(); var loggingViewModel = configurationSourceModel.AddSection(LoggingSettings.SectionName, LoggingSection); var tracelistenersCollection = loggingViewModel.GetDescendentsOfType<TraceListenerDataCollection>().First(); var addDBtracelinerCommand = tracelistenersCollection.Commands.First().ChildCommands.Where(x => x.Title == "Add Database Trace Listener").First(); addDBtracelinerCommand.Execute(null); }
protected override void Arrange() { base.Arrange(); UIServiceMock.Setup(x => x.ShowMessageWpf(It.IsAny<string>(), It.IsAny<string>(), It.Is<MessageBoxButton>(b => b == MessageBoxButton.YesNo))) .Returns(MessageBoxResult.Yes).Verifiable(); configurationSourceModel = Container.Resolve<ConfigurationSourceModel>(); configurationSourceModel.AddSection(LoggingSettings.SectionName, new LoggingSettings()); }
protected override void Arrange() { base.Arrange(); sourceModel = Container.Resolve<ConfigurationSourceModel>(); sourceModel.AddSection(LoggingSettings.SectionName, LoggingSection); var loggingSectionViewModel = sourceModel.Sections.Where(x => typeof(LoggingSettings) == x.ConfigurationType).First(); weakReferenceList = loggingSectionViewModel.DescendentElements().Union(new[] { loggingSectionViewModel }) .Select(x => new WeakReference(x)).ToArray(); }