void DataEdit() { var testCell = new TestCellBody(); worksheet[1, 2] = testCell; // set data, this should triggers the OnSetData method of body worksheet[1, 2] = "abc"; // check data that has been edited by cell body atucally AssertEquals(worksheet[1, 2], "(abc)"); }
void StopEdit() { var testCell = new TestCellBody(); worksheet[1, 3] = testCell; worksheet.StartEdit(1, 3); // grid must be not in editing mode AssertEquals(worksheet.IsEditing, false); // edit-required flag must be set to true AssertEquals(testCell.editRequired, true); }
void SetAndRemove() { SetUp(); // create customize cell body for test var testCell = new TestCellBody(); // apply this body to cell 1,1 worksheet[1, 1] = testCell; // check the cell body whether it is inside the cell AssertEquals(worksheet.GetCell(1, 1).Body, testCell); // check flag to test whether OnSetup method has been called actually AssertEquals(testCell.initialized, true); // remove the cell body worksheet.RemoveCellBody(1, 1); // check body that must be not there AssertEquals(worksheet.GetCell(1, 1).Body, null); }