コード例 #1
0
        public void Test_SubGrid_Invalid_GetSubgrid()
        {
            ISubGrid subgrid = null;

            SubGridTree tree = new SubGridTree(SubGridTreeConsts.SubGridTreeLevels, 1.0, new SubGridFactory <NodeSubGrid, LeafSubGrid>());

            subgrid = new SubGrid(tree, null, SubGridTreeConsts.SubGridTreeLevels);

            // Check a call to the base GetSubGrid subgrid yields an exception
            try
            {
                ISubGrid gotSubgrid = subgrid.GetSubGrid(0, 0);
                Assert.True(false, "Base SubGrid class GetSubGrid() did not throw an exception");
            }
            catch (Exception)
            {
                // Good!
            }
        }