protected override void Arrange() { base.Arrange(); Viewmodel = SectionViewModel.CreateSection(Container, ExceptionHandlingSettings.SectionName, Section); Handler = (CollectionElementViewModel)Viewmodel.DescendentElements(x => typeof(ExceptionHandlerData).IsAssignableFrom(x.ConfigurationType)).First(); }
protected override void Act() { firstHandler = ViewModel.DescendentElements(x => x.ConfigurationType == typeof(TestHandlerData)).OfType <CollectionElementViewModel>().Where( x => x.Name == "One").Single(); firstHandler.Select(); secondHandler = ViewModel.DescendentElements(x => x.ConfigurationType == typeof(TestHandlerData)).OfType <CollectionElementViewModel>().Where( x => x.Name == "Two").Single(); secondHandler.MoveDown.Execute(null); }
///<summary> /// Initializes a new instance of <see cref="MoveUpCommand"/>. ///</summary> ///<param name="collection">The collection containing the <paramref name="element"/> to move.</param> ///<param name="element">The element to move.</param> ///<param name="uiService">The user-interface service used to display messages and windows to the user.</param> public MoveUpCommand(ElementCollectionViewModel collection, CollectionElementViewModel element, IUIServiceWpf uiService) : base(uiService) { this.collection = collection; this.element = element; }
///<summary> /// Initializes a new instance of <see cref="MoveDownCommand"/>. ///</summary> ///<param name="collection">The collection containing the <paramref name="element"/> to move.</param> ///<param name="element">The element to move.</param> ///<param name="uiService">The user-interface service used to display messages and windows to the user.</param> public MoveDownCommand(ElementCollectionViewModel collection, CollectionElementViewModel element, IUIServiceWpf uiService) : base(uiService) { this.collection = collection; this.element = element; }