public void NewWord_DictionaryContainsWordEmpty_ContainsBlankAndEmpty() { // The string "(Empty)" used to be retured as the lexical form for an empty entry. // A result of this was that by preventing the Add New Word button from creating // multiple empty entries, if you actually had a word "(Empty)", a new word // would not be created. This test ensures that this bad behavior does not happen. Application.DoEvents(); StartWithEmpty(); ClickAddWord(); Application.DoEvents(); var form = "(Empty)"; TypeInLexicalForm(form); Application.DoEvents(); ClickAddWord(); Application.DoEvents(); Assert.AreEqual(2, _lexEntryRepository.CountAllItems()); LexicalFormMustMatch(string.Empty); ListViewTester l = new ListViewTester("_recordsListBox", _window); // select other entry l.Select((l.Properties.SelectedIndices[0] + 1) % 2); LexicalFormMustMatch(form); }
public void SelectingConnectionsPageLoadsSettings() { ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm); listViewTester.Select("Connections"); CheckBoxTester checkboxTester = new CheckBoxTester("chkSingleClickOnConnectionOpensIt", _optionsForm); Assert.That(checkboxTester.Text, Does.Match("Single click on connection")); }
public void SelectingAppearancePageLoadsSettings() { ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm); listViewTester.Select("Appearance"); CheckBoxTester checkboxTester = new CheckBoxTester("chkShowSystemTrayIcon", _optionsForm); Assert.That(checkboxTester.Text, Does.Match("show notification area icon")); }
public void SelectingAdvancedPageLoadsSettings() { ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm); listViewTester.Select("Advanced"); CheckBoxTester checkboxTester = new CheckBoxTester("chkWriteLogFile", _optionsForm); Assert.That(checkboxTester.Text, Does.Match("Write log file")); }
public void SelectingThemePageLoadsSettings() { ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm); listViewTester.Select("Theme"); ButtonTester buttonTester = new ButtonTester("btnThemeNew", _optionsForm); Assert.That(buttonTester.Text, Does.Match("New")); }
public void SelectingStartupExitPageLoadsSettings() { ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm); listViewTester.Select("Startup/Exit"); CheckBoxTester checkboxTester = new CheckBoxTester("chkSaveConsOnExit", _optionsForm); Assert.That(checkboxTester.Text, Does.Match("Save connections")); }
public void SelectingUpdatesPageLoadsSettings() { ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm); listViewTester.Select("Updates"); CheckBoxTester checkboxTester = new CheckBoxTester("chkCheckForUpdatesOnStartup", _optionsForm); Assert.That(checkboxTester.Text, Does.Match("Check for updates")); }
public void SelectingSQLPageLoadsSettings() { ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm); listViewTester.Select("SQL Server"); CheckBoxTester checkboxTester = new CheckBoxTester("chkUseSQLServer", _optionsForm); Assert.That(checkboxTester.Text, Does.Match("Use SQL")); }
public void SelectingTabsPanelPageLoadsSettings() { ListViewTester listViewTester = new ListViewTester("PageListView", _optionsForm); listViewTester.Select("Tabs & Panels"); CheckBoxTester checkboxTester = new CheckBoxTester("chkAlwaysShowPanelTabs", _optionsForm); Assert.That(checkboxTester.Text, Does.Match("Always show panel tabs")); }
[Platform(Exclude = "Unix")] // MouseController uses Win32.GetCursorPos so not portable public void ClickOnWhiteSpaceToRightOfEntry_ThenKeyboardNavigate_CorrectEntrySelected() { ListViewTester l = new ListViewTester("_listView", _window); using (MouseController mc = new MouseController(l)) { using (KeyboardController kc = new KeyboardController(l)) { l.Select(0); Rectangle r = l.Properties.GetItemRect(1); mc.Click(r.Right + 1, r.Top + 1); kc.Press("{DOWN}"); kc.Release("{DOWN}"); } } Assert.AreEqual(2, l.Properties.SelectedIndices[0]); }