Inheritance: Dev2.Activities.Designers2.RecordsLength.RecordsLengthDesignerViewModel
 public void RecordsLengthDesignerViewModel_SetRecordsetNameValue_ModelItemIsValid_RecordSetOnModelItemIsSet()
 {
     var modelItem = CreateModelItem();
     var viewModel = new TestRecordsLengthDesignerViewModel(modelItem);
     const string ExcpectedVal = "[[Table_Records()]]";
     viewModel.RecordsetNameValue = ExcpectedVal;
     Assert.AreEqual(ExcpectedVal, viewModel.RecordsetName);
 }
        public void RecordsLengthDesignerViewModel_SetRecordsetNameValue_ModelItemIsValid_RecordSetOnModelItemIsSet()
        {
            var          modelItem    = CreateModelItem();
            var          viewModel    = new TestRecordsLengthDesignerViewModel(modelItem);
            const string ExcpectedVal = "[[Table_Records()]]";

            viewModel.RecordsetNameValue = ExcpectedVal;
            Assert.AreEqual(ExcpectedVal, viewModel.RecordsetName);
        }
        public void RecordsLengthDesignerViewModel_UpdateHelp_ShouldCallToHelpViewMode()
        {
            //------------Setup for test--------------------------
            var mockMainViewModel = new Mock <IShellViewModel>();
            var mockHelpViewModel = new Mock <IHelpWindowViewModel>();

            mockHelpViewModel.Setup(model => model.UpdateHelpText(It.IsAny <string>())).Verifiable();
            mockMainViewModel.Setup(model => model.HelpViewModel).Returns(mockHelpViewModel.Object);
            CustomContainer.Register(mockMainViewModel.Object);
            var viewModel = new TestRecordsLengthDesignerViewModel(CreateModelItem());

            //------------Execute Test---------------------------
            viewModel.UpdateHelpDescriptor("help");
            //------------Assert Results-------------------------
            mockHelpViewModel.Verify(model => model.UpdateHelpText(It.IsAny <string>()), Times.Once());
        }