Exemplo n.º 1
0
        public void Test_SubGrid_Invalid_SetSubgrid()
        {
            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 SetSubGrid subgrid yields an exception
            try
            {
                subgrid.SetSubGrid(0, 0, null);
                Assert.True(false, "Base SubGrid class SetSubGrid() did not throw an exception");
            }
            catch (Exception)
            {
                // Good!
            }
        }