Пример #1
0
        public SharepointListDeleteDesignerViewModel(ModelItem modelItem)
            : base(modelItem, new AsyncWorker(), EnvironmentRepository.Instance.ActiveEnvironment, EventPublishers.Aggregator, false)
        {
            WhereOptions = new ObservableCollection <string>(SharepointSearchOptions.SearchOptions());
            dynamic mi = ModelItem;

            InitializeItems(mi.FilterCriteria);
        }
        public SharepointListDeleteDesignerViewModel(ModelItem modelItem)
            : base(modelItem, new AsyncWorker(), ServerRepository.Instance.ActiveServer, EventPublishers.Aggregator, false)
        {
            WhereOptions = new ObservableCollection <string>(SharepointSearchOptions.SearchOptions());
            dynamic mi = ModelItem;

            InitializeItems(mi.FilterCriteria);
            HelpText = Warewolf.Studio.Resources.Languages.HelpText.Tool_SharePoint_Delete_List_Item;
        }
Пример #3
0
        public SharepointListReadDesignerViewModel(ModelItem modelItem, IAsyncWorker asyncWorker, IServer envModel)
            : base(modelItem, asyncWorker, envModel, EventPublishers.Aggregator, false)
        {
            WhereOptions = new ObservableCollection <string>(SharepointSearchOptions.SearchOptions());
            dynamic mi = ModelItem;

            InitializeItems(mi.FilterCriteria);
            HelpText = Warewolf.Studio.Resources.Languages.HelpText.Tool_SharePoint_Read_List_Item;
        }
        public void SharepointListReadDesignerViewModel_WhereOptions_Constructor_ShouldBePopulatedWithCorrectOptions()
        {
            //------------Setup for test--------------------------


            //------------Execute Test---------------------------
            var sharepointListReadDesignerViewModel = new SharepointListReadDesignerViewModel(CreateModelItem(), new SynchronousAsyncWorker(), new Mock <IServer>().Object);

            //------------Assert Results-------------------------
            Assert.IsNotNull(sharepointListReadDesignerViewModel);
            Assert.IsNotNull(sharepointListReadDesignerViewModel.WhereOptions);
            Assert.AreEqual(9, sharepointListReadDesignerViewModel.WhereOptions.Count);
            CollectionAssert.AreEqual(SharepointSearchOptions.SearchOptions(), sharepointListReadDesignerViewModel.WhereOptions);
        }