public void AboutPresenter_Initialise_Copies_Initial_Values_From_Model_To_View() { var buildDate = new DateTime(2015, 8, 20, 19, 18, 17); _ApplicationInformation.Setup(m => m.Copyright).Returns("The copyright"); _ApplicationInformation.Setup(m => m.Description).Returns("The description"); _ApplicationInformation.Setup(m => m.ApplicationName).Returns("The name"); _ApplicationInformation.Setup(m => m.FullVersion).Returns("The version"); _ApplicationInformation.Setup(m => m.ProductName).Returns("The product name"); _ApplicationInformation.Setup(m => m.BuildDate).Returns(buildDate); _ConfigurationStorage.Setup(m => m.Folder).Returns("The config folder"); _RuntimeEnvironment.Setup(m => m.IsMono).Returns(true); _RuntimeEnvironment.Setup(m => m.Is64BitProcess).Returns(true); _Presenter.Initialise(_View.Object); Assert.AreEqual("The copyright", _View.Object.Copyright); Assert.AreEqual("The description", _View.Object.Description); Assert.AreEqual("The name", _View.Object.Caption); Assert.AreEqual("The version", _View.Object.Version); Assert.AreEqual("The config folder", _View.Object.ConfigurationFolder); Assert.AreEqual("The product name", _View.Object.ProductName); Assert.AreEqual(buildDate, _View.Object.BuildDate); Assert.AreEqual(true, _View.Object.IsMono); Assert.AreEqual(true, _View.Object.Is64BitProcess); }
public DialogResult ShowView() { _Presenter = Factory.Singleton.Resolve <IAboutPresenter>(); _Presenter.Initialise(this); return(DialogResult.OK); }
/// <summary> /// Called when the form has been created but before it is on display. /// </summary> /// <param name="e"></param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!DesignMode) { Localise.Form(this); logoPictureBox.Image = Resources.Images.HelpAbout; _Presenter = Factory.Singleton.Resolve <IAboutPresenter>(); _Presenter.Initialise(this); _OnlineHelp = new OnlineHelpHelper(this, OnlineHelpAddress.WinFormsAboutDialog); } }
/// <summary> /// Called when the form has been created but before it is on display. /// </summary> /// <param name="e"></param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); if(!DesignMode) { Localise.Form(this); logoPictureBox.Image = Resources.Images.HelpAbout; _Presenter = Factory.Singleton.Resolve<IAboutPresenter>(); _Presenter.Initialise(this); _OnlineHelp = new OnlineHelpHelper(this, OnlineHelpAddress.WinFormsAboutDialog); } }