Exemplo n.º 1
0
        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"));
        }
Exemplo n.º 3
0
        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"));
        }
Exemplo n.º 4
0
        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"));
        }
Exemplo n.º 6
0
        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"));
        }
Exemplo n.º 7
0
        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"));
        }
Exemplo n.º 8
0
        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"));
        }
Exemplo n.º 10
0
        [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]);
        }