예제 #1
0
        public void MethodGetErrorText()
        {
            Bitmap   b = new Bitmap(1, 1);
            Graphics g = Graphics.FromImage(b);

            BaseCell c = new BaseCell();

            Assert.AreEqual(string.Empty, c.PublicGetErrorText(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(string.Empty, (dgv.Rows[0].Cells[0] as BaseCell).PublicGetErrorText(dgv.Rows[0].Cells[0].RowIndex), "A2");
            g.Dispose();
            b.Dispose();
        }
예제 #2
0
		public void MethodGetErrorText ()
		{
			Bitmap b = new Bitmap (1, 1);
			Graphics g = Graphics.FromImage (b);

			BaseCell c = new BaseCell ();
			Assert.AreEqual (string.Empty, c.PublicGetErrorText (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 (string.Empty, (dgv.Rows[0].Cells[0] as BaseCell).PublicGetErrorText (dgv.Rows[0].Cells[0].RowIndex), "A2");
			g.Dispose ();
			b.Dispose ();
		}