コード例 #1
0
        public void drawWithTwoExclusionsSkippedOnMinValue()
        {
            CellInRangePicker picker = new CellInRangePicker(new MockPickerStrategy(1));
            Cell result = picker.drawBetweenWithExclusion(new Cell(0, 0), new Cell(0, 5), new Cell(0, 0), new Cell(0, 1));

            Assert.AreEqual(new Cell(0, 2), result);
        }
コード例 #2
0
        public void drawInRangeOnConsecutiveCellsBothExcluded()
        {
            CellInRangePicker picker = new CellInRangePicker(new MockPickerStrategy(1));
            Cell result = picker.drawBetweenWithExclusion(new Cell(0, 0), new Cell(0, 1), new Cell(0, 0), new Cell(0, 1));

            Assert.AreEqual(new Cell(0, 0), result);
        }
コード例 #3
0
        public void pickingCellBetweenCellsOnSameRow()
        {
            CellInRangePicker picker = new CellInRangePicker(new MockPickerStrategy(4));
            Cell result = picker.drawBetween(new Cell(0, 0), new Cell(0, 5));

            Assert.AreEqual(new Cell(0, 3), result);
        }
コード例 #4
0
        public void drawInRangeCollapsedOnOneCell()
        {
            CellInRangePicker picker = new CellInRangePicker(new MockPickerStrategy(1));
            Cell result = picker.drawBetween(new Cell(0, 0), new Cell(0, 0));

            Assert.AreEqual(new Cell(0, 0), result);
        }