public void Test_SubGrid_Invalid_CellHasValue() { 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 { if (subgrid.CellHasValue(0, 0)) { } Assert.True(false, "Base SubGrid class CellHasValue() did not throw an exception"); } catch (Exception) { // Good! } }