Example #1
0
        public void FormTitle_SetValue_ReturnsSetValueWithSuffix()
        {
            GlobalWizardViewModel model = new GlobalWizardViewModel("Suffix");

            model.FormTitle = "Value";

            Assert.AreEqual("ValueSuffix", model.FormTitle);
        }
Example #2
0
        public void FormTitle_SetSameValue_DoesNotFirePropertyChangedValue()
        {
            GlobalWizardViewModel model = new GlobalWizardViewModel("Suffix");

            model.FormTitle = "Suffix";

            model.ShouldNotNotifyOn(s => s.FormTitle).When(s => s.FormTitle = "Suffix");
        }
Example #3
0
        public MainFormPresenter(IApplicationController controller, IMainFormView view, GlobalWizardViewModel model) : base(controller, view)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            _model = model;
        }
        public void Initialize(GlobalWizardViewModel model)
        {
            if (model == null)
            {
                AlertErrorMessage("Model is null");
                return;
            }

            InitializeComponent();

            DataBindings.Add("Text", model, "FormTitle", false, DataSourceUpdateMode.OnPropertyChanged);

            Show();
        }
Example #5
0
        public void FormTitle_SetValue_FiresPropertyChangedValue()
        {
            GlobalWizardViewModel model = new GlobalWizardViewModel(It.IsAny <string>());

            model.ShouldNotifyOn(s => s.FormTitle).When(s => s.FormTitle = "Some new value");
        }
Example #6
0
        public void FormTitle_DoNotSetValue_ReturnsExpectedSuffix()
        {
            GlobalWizardViewModel model = new GlobalWizardViewModel("Suffix");

            Assert.AreEqual("Suffix", model.FormTitle);
        }
Example #7
0
        public void Constructor_CreatesCopierSettingsModel()
        {
            GlobalWizardViewModel model = new GlobalWizardViewModel(It.IsAny <string>());

            Assert.IsNotNull(model.CopyWorkerSettings);
        }