public void TestSetCollectionOnGrid_NoOfRows() { //---------------Set up test pack------------------- MyBO.LoadDefaultClassDef(); BusinessObjectCollection <MyBO> col = CreateCollectionWith_4_Objects(); IReadOnlyGrid readOnlyGrid = GetControlFactory().CreateReadOnlyGrid(); DisposeOnTearDown(readOnlyGrid); AddControlToForm(readOnlyGrid); SetupGridColumnsForMyBo(readOnlyGrid); //---------------Execute Test ---------------------- #pragma warning disable 618,612 readOnlyGrid.SetBusinessObjectCollection(col); #pragma warning restore 618,612 //---------------Test Result ----------------------- Assert.AreEqual(4, readOnlyGrid.Rows.Count); //---------------Tear Down ------------------------- }