コード例 #1
0
        public void VerifyThatIsMultiSelectEnabledReturnsExpectedResultForDataGrid()
        {
            var datagrid       = new DataGrid();
            var datagridresult = SelectionHelper.IsMultiSelectEnabled(datagrid);

            Assert.IsTrue(datagridresult);
        }
コード例 #2
0
        public void VerifyThatIsMultiSelectEnabledReturnsExpectedResultForListBox()
        {
            var listboxresult = false;

            var listbox = new ListBox();

            listbox.SelectionMode = SelectionMode.Multiple;
            listboxresult         = SelectionHelper.IsMultiSelectEnabled(listbox);
            Assert.IsTrue(listboxresult);

            listbox.SelectionMode = SelectionMode.Extended;
            listboxresult         = SelectionHelper.IsMultiSelectEnabled(listbox);
            Assert.IsTrue(listboxresult);

            listbox.SelectionMode = SelectionMode.Single;
            listboxresult         = SelectionHelper.IsMultiSelectEnabled(listbox);
            Assert.IsFalse(listboxresult);
        }
コード例 #3
0
        public void VerifyThatIsMultiSelectEnabledReturnsExpectedResultForDevExpressGridControl()
        {
            var gridControlResult = false;
            var gridControl       = new GridControl();

            gridControl.SelectionMode = MultiSelectMode.MultipleRow;

            gridControlResult = SelectionHelper.IsMultiSelectEnabled(gridControl);
            Assert.IsTrue(gridControlResult);

            gridControl.SelectionMode = MultiSelectMode.Row;
            gridControlResult         = SelectionHelper.IsMultiSelectEnabled(gridControl);
            Assert.IsTrue(gridControlResult);

            gridControl.SelectionMode = MultiSelectMode.Cell;
            gridControlResult         = SelectionHelper.IsMultiSelectEnabled(gridControl);
            Assert.IsTrue(gridControlResult);

            gridControl.SelectionMode = MultiSelectMode.None;
            gridControlResult         = SelectionHelper.IsMultiSelectEnabled(gridControl);
            Assert.IsFalse(gridControlResult);
        }