public void ScrollWithinSingleTableView_SelectEndAfterTable_CoerceSelectionEndIntoTable() { var scroll = new ScrollRegion { AllowSingleTableMode = true, Width = 16, Height = 16 }; var select = new Selection(scroll, new PokemonModel(new byte[0x200]), new ChangeHistory <ModelDelta>(p => p)); scroll.SetTableMode(8, 24); select.SelectionEnd = new Point(0, 2); Assert.Equal(new Point(15, 1), select.SelectionEnd); }
public void ScrollWithSingleTableView_SelectCellBeforeStartOfTable_FirstCellOfTableSelected() { var scroll = new ScrollRegion { AllowSingleTableMode = true, Width = 16, Height = 16 }; var select = new Selection(scroll, new PokemonModel(new byte[0x200]), new ChangeHistory <ModelDelta>(p => p)); scroll.SetTableMode(8, 24); select.SelectionStart = new Point(4, 0); Assert.Equal(new Point(8, 0), select.SelectionStart); }