public void OptionsPageGeneralTestInitialize() { testString = "This is the test string."; tmpImgFilePath = AppDomain.CurrentDomain.BaseDirectory + Path.DirectorySeparatorChar + tmpImgFilePath; optionsPageGeneral = new OptionsPageGeneral(); optionsPageGeneralAccessor = new Microsoft_Samples_VisualStudio_IDE_OptionsPage_OptionsPageGeneralAccessor(optionsPageGeneral); // to forbid display of MessageBoxes WinFormsHelper.AllowMessageBox = false; }
public void OnClosedTest() { OptionsPageGeneral target = new OptionsPageGeneral(); Microsoft_Samples_VisualStudio_IDE_OptionsPage_OptionsPageGeneralAccessor accessor = optionsPageGeneralAccessor; EventArgs e = null; accessor.OnClosed(e); }
public void OnDeactivateTest() { OptionsPageGeneral target = new OptionsPageGeneral(); Microsoft_Samples_VisualStudio_IDE_OptionsPage_OptionsPageGeneralAccessor accessor = optionsPageGeneralAccessor; CancelEventArgs cancelEventArgs = new CancelEventArgs(false); // we simulate Cancel button choice, in this case we expect that // cancelEventArgs.Cancel was switched to the true state. WinFormsHelper.FakeDialogResult = DialogResult.Cancel; accessor.OnDeactivate(cancelEventArgs); Assert.IsTrue(cancelEventArgs.Cancel, "CancelEventArgs Cancel property was initialized by not expected value in case when simulated Cancel button choice."); }
public void OptionsPageGeneralTestInitialize() { testString = "This is the test string."; tmpImgFilePath = AppDomain.CurrentDomain.BaseDirectory + Path.DirectorySeparatorChar + tmpImgFilePath; optionsPageGeneral = new OptionsPageGeneral(); optionsPageGeneralAccessor = new Microsoft_Samples_VisualStudio_IDE_OptionsPage_OptionsPageGeneralAccessor(optionsPageGeneral); // to forbid display of MessageBoxes WinFormsHelper.AllowMessageBox = false; }