protected override void Arrange()
        {
            base.Arrange();
            ApplicationModel = Container.Resolve<ApplicationViewModel>();

            ApplicationModelChangedListener = new PropertyChangedListener(ApplicationModel);
        }
        protected override void Arrange()
        {
            base.Arrange();

            UIServiceMock.Setup(x => x.ShowFileDialog(It.IsAny<FileDialog>())).Returns(new FileDialogResult { DialogResult = true, FileName = TestConfigurationFilePath });
            UIServiceMock.Setup(x => x.ShowWindow(It.IsAny<WaitDialog>())).Verifiable("Wait dialog not displayed");
            shellServiceChangedListener = new PropertyChangedListener(ApplicationModel);
        }
        protected override void Arrange()
        {
            base.Arrange();

            step = Container.Resolve<PickExceptionStep>();

            propertyChangedListener = new PropertyChangedListener(step);
        }
        protected override void Arrange()
        {
            base.Arrange();

            var section = new ElementForValidation();
            sectionModel = SectionViewModel.CreateSection(Container, "mock section", section);
            validationResult = new ElementValidationResult(sectionModel, "TestMessage", true);
            listener = new PropertyChangedListener(validationResult);
        }
        protected override void Act()
        {
            overridenWrapTypeProperty = base.OverridesProperty.ChildProperties.Where(x => x.PropertyName == "WrapExceptionTypeName").FirstOrDefault();

            overridenWrapTypePropertyChangedListener = new PropertyChangedListener(overridenWrapTypeProperty.BindableProperty);

            OverridesProperty.Value = OverridesProperty.Converter.ConvertFromString(OverridesProperty, "Override Properties");
            
        }
        protected override void Arrange()
        {
            base.Arrange();
            defaultCacheManagerProperty = (ElementReferenceProperty)CachingViewModel.Property("DefaultCacheManager");
            defaultCacheManagerProperty.Initialize(null);

            cacheManager = CachingViewModel.GetDescendentsOfType<CacheManagerData>().First();

            defaultCacheManagerPropertyChangedListener = new PropertyChangedListener(defaultCacheManagerProperty);
        }
        protected override void Arrange()
        {
            base.Arrange();

            Steps[0].SetIsValid(true);
            changeListener = new PropertyChangedListener(this.Wizard);
            commandListener = new CanExecuteChangedListener();
            commandListener.Add(this.Wizard.NextCommand);
            commandListener.Add(this.Wizard.PreviousCommand);
        }
        protected override void Arrange()
        {
            base.Arrange();

            var sourceModel = Container.Resolve<ConfigurationSourceModel>();
            LoggingViewModel = sourceModel.AddSection(LoggingSettings.SectionName, LoggingSection);

            defaultCategoryProperty = (ElementReferenceProperty)LoggingViewModel.Property("DefaultCategory");
            defaultCategoryProperty.Initialize(null);

            traceSource = LoggingViewModel.GetDescendentsOfType<TraceSourceData>().First();

            defaultCacheManagerPropertyChangedListener = new PropertyChangedListener(defaultCategoryProperty);
        }
        protected override void Act()
        {
            firstHandler =
                ViewModel.DescendentElements(x => x.ConfigurationType == typeof (TestHandlerData)).OfType
                    <CollectionElementViewModel>()
                    .Where(x => x.Name == "One").Single();

            firstHandler.Select();
            firstElementChangeListener = new PropertyChangedListener(firstHandler);

            secondHandler =
                ViewModel.DescendentElements(x => x.ConfigurationType == typeof (TestHandlerData)).OfType
                    <CollectionElementViewModel>()
                    .Where(x => x.Name == "Two").Single();

            secondHandler.MoveUp.Execute(null);
        }
        public void when_changing_name_path_changes()
        {
            var anyPolicy = viewModel.DescendentElements().Where(x => x.ConfigurationType == typeof(ExceptionPolicyData)).First();

            string name = anyPolicy.Name;
            using (var propListener = new PropertyChangedListener(anyPolicy))
            {
                anyPolicy.Property("Name").Value = "new name";

                Assert.IsTrue(propListener.ChangedProperties.Contains("Path"));
            }
        }
        public void when_changing_name_property_on_named_element_name_property_changes()
        {
            var anyPolicy = viewModel.DescendentElements().Where(x => x.ConfigurationType == typeof(ExceptionPolicyData)).First();
            var nameProperty = anyPolicy.Property("Name");

            string name = anyPolicy.Name;

            using (PropertyChangedListener listener = new PropertyChangedListener(anyPolicy))
            {
                nameProperty.Value = "new value";
                Assert.IsTrue(listener.ChangedProperties.Contains("Name"));
            }
        }
        protected override void Arrange()
        {
            base.Arrange();

            applicationModelChangedListener = new PropertyChangedListener(base.ApplicationModel);
        }
 protected override void Arrange()
 {
     base.Arrange();
     propertyPropertyChangedListener = new PropertyChangedListener(base.property.BindableProperty);
 }
        protected override void Arrange()
        {
            base.Arrange();
            requiredReferenceingProperty = this.SectionViewModel.Property("RequiredReferenceItem");

            requiredReferenceingProperty.Value = "FirstItem";
            propertyChangeListener = new PropertyChangedListener(requiredReferenceingProperty);
        }
        protected override void Arrange()
        {
            base.Arrange();

            var deepestRule = ValidationViewModel.DescendentConfigurationsOfType<AndCompositeValidatorData>()
                    .Where(x => string.Equals(x.NameProperty.Value, DeepestRuleValidatorName)).First();

            ruleCollection = (ElementCollectionViewModel) deepestRule.ParentElement;

            walker = new ElementListLayoutWalker(Layout.Contained);
            var currentDeepestLayout = walker.LayoutElements().OfType<TwoColumnsLayout>().Where(l => l.Left == deepestRule).First();
            layoutHeader = FindHorizontalList(currentDeepestLayout.ColumnName);
            propertyChangedListener = new PropertyChangedListener(layoutHeader);
        }
        public void then_overridden_value_changed_if_main_is_changed()
        {
            using (PropertyChangedListener listener = new PropertyChangedListener(OverriddenExceptionMessage))
            {
                MainExceptionMessage.Value = "New Value";

                Assert.IsTrue(listener.ChangedProperties.Contains("Value"));
                Assert.AreEqual("New Value", OverriddenExceptionMessage.Value);
            }
        }
        protected override void Arrange()
        {
            base.Arrange();

            var configurationSourceModel = Container.Resolve<ConfigurationSourceModel>();
            var viewModel = configurationSourceModel.AddSection(ExceptionHandlingSettings.SectionName, Section);
            var loggingModel = configurationSourceModel.AddSection(LoggingSettings.SectionName, LogginSettings);

            var logExceptionHandler = viewModel.DescendentElements(x => x.ConfigurationType == typeof(LoggingExceptionHandlerData)).First();
            logCategoryProperty = logExceptionHandler.Property("LogCategory");
            logCategoryPropertyChangeListener = new PropertyChangedListener(logCategoryProperty);
        }
 protected override void Act()
 {
     valueProperty = base.ParameterElement.Property("Value");
     valuePropertyPropertyChangedListener = new PropertyChangedListener(valueProperty);
     valueProperty.Value = typeof(ValueElement);
 }