public void ValidationTest() { var exchangeSettings = new ExchangeSettings(); Assert.AreEqual("The Exchange Server field is required.", exchangeSettings.Validate("ServerPath")); exchangeSettings.ServerPath = "exchange.example.com"; Assert.AreEqual("", exchangeSettings.Validate("ServerPath")); }
public void ValidationTest() { var exchangeSettings = new ExchangeSettings(); exchangeSettings.Validate(); var clone = (ExchangeSettings)exchangeSettings.Clone(); ValidationTestCore(exchangeSettings); ValidationTestCore(clone); }
private void ShowExchangeSettingsView() { ExchangeSettings exchangeSettings = EmailAccount.EmailAccountSettings is ExchangeSettings ? (ExchangeSettings)EmailAccount.EmailAccountSettings : new ExchangeSettings(); exchangeSettings.Validate(); exchangeSettingsViewModel = exchangeSettingsViewModelFactory.CreateExport().Value; exchangeSettingsViewModel.Model = exchangeSettings; editEmailAccountViewModel.ContentView = exchangeSettingsViewModel.View; }