public void MethodGetContentBoundsOverload () { Bitmap b = new Bitmap (1, 1); Graphics g = Graphics.FromImage (b); BaseCell c = new BaseCell (); Assert.AreEqual (Rectangle.Empty, c.PublicGetContentBounds (g, c.Style, c.RowIndex), "A1"); DataGridView dgv = new DataGridView (); dgv.Columns.Add ("hi", "there"); DataGridViewRow row = new DataGridViewRow (); row.Cells.Add (c); dgv.Rows.Add (row); Assert.AreEqual (Rectangle.Empty, (dgv.Rows[0].Cells[0] as BaseCell).PublicGetContentBounds (g, dgv.Rows[0].Cells[0].InheritedStyle, dgv.Rows[0].Cells[0].RowIndex), "A2"); g.Dispose (); b.Dispose (); }