Beispiel #1
0
        public void Test_SubGrid_Invalid_Clear()
        {
            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.Clear();
                Assert.True(false, "Base SubGrid class Clear() did not throw an exception");
            }
            catch (Exception)
            {
                // Good!
            }
        }