Пример #1
0
        private TableView<Object> CreateTable(Mock<ITableModel<Object>> modelMock, TableRendererMock<Object> renderer, Mock<ITableSelectionModel> selectionModelMock, ITableGrid grid = null)
        {
            if (grid == null)
                grid = new TableGrid();

            var table = new TableView<Object>(modelMock.Object, renderer, selectionModelMock.Object, grid);
            table.SetCoordinates(0, 0, 500, 500);
            return table;
        }
Пример #2
0
 private TableView<Object> CreateTable(int rows, int columns, Mock<ITableSelectionModel> selectionModel, ITableGrid grid = null)
 {
     var modelStub = new Mock<ITableModel<Object>>();
     SetDimension(modelStub, rows, columns);
     return CreateTable(modelStub, new TableRendererMock<Object>(), selectionModel, grid);
 }
Пример #3
0
 private TableView<Object> CreateTable(Mock<ITableModel<Object>> modelMock, ITableGrid grid = null)
 {
     return CreateTable(modelMock, new TableRendererMock<Object>(), new Mock<ITableSelectionModel>(), grid);
 }
Пример #4
0
 private TableView<Object> CreateTable(int rows, int columns, ITableGrid grid = null)
 {
     var selectionModelStub = new Mock<ITableSelectionModel>();
     return CreateTable(rows, columns, selectionModelStub, grid);
 }