public void FormTitle_SetValue_ReturnsSetValueWithSuffix() { GlobalWizardViewModel model = new GlobalWizardViewModel("Suffix"); model.FormTitle = "Value"; Assert.AreEqual("ValueSuffix", model.FormTitle); }
public void FormTitle_SetSameValue_DoesNotFirePropertyChangedValue() { GlobalWizardViewModel model = new GlobalWizardViewModel("Suffix"); model.FormTitle = "Suffix"; model.ShouldNotNotifyOn(s => s.FormTitle).When(s => s.FormTitle = "Suffix"); }
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(); }
public void FormTitle_SetValue_FiresPropertyChangedValue() { GlobalWizardViewModel model = new GlobalWizardViewModel(It.IsAny <string>()); model.ShouldNotifyOn(s => s.FormTitle).When(s => s.FormTitle = "Some new value"); }
public void FormTitle_DoNotSetValue_ReturnsExpectedSuffix() { GlobalWizardViewModel model = new GlobalWizardViewModel("Suffix"); Assert.AreEqual("Suffix", model.FormTitle); }
public void Constructor_CreatesCopierSettingsModel() { GlobalWizardViewModel model = new GlobalWizardViewModel(It.IsAny <string>()); Assert.IsNotNull(model.CopyWorkerSettings); }