コード例 #1
0
ファイル: SearchGridTests.cs プロジェクト: Mchristos/Snappy
        public void GridCellOfPoint_Expected(double left, double bottom, double gridSizeX, double gridSizeY, int cellCountX, int cellCountY, double queryPointX, double queryPointY, int expectedCellX, int expectedCellY)
        {
            var grid       = new SearchGrid <string>(left, bottom, gridSizeX, gridSizeY, cellCountX, cellCountY);
            var resultCell = grid.GetGridCellOfPoint(queryPointX, queryPointY);

            Assert.Equal(expectedCellX, resultCell[0]);
            Assert.Equal(expectedCellY, resultCell[1]);
        }