public void Test_Selector_Clear_ClearsItems() { //---------------Set up test pack------------------- ITabControl tabControl = CreateTabControl(); BOColTabControlManager selectorManager = CreateBOTabControlManager(tabControl); MyBO bo; BusinessObjectCollection <MyBO> col = GetMyBoCol_3Items(out bo); selectorManager.BusinessObjectCollection = col; //---------------Assert Preconditions -------------- Assert.IsNotNull(selectorManager.CurrentBusinessObject); Assert.IsNotNull(selectorManager.BusinessObjectCollection); //---------------Execute Test ---------------------- selectorManager.Clear(); //---------------Test Result ----------------------- Assert.IsNull(selectorManager.BusinessObjectCollection); Assert.IsNull(selectorManager.CurrentBusinessObject); Assert.AreEqual(0, selectorManager.NoOfItems); }
/// <summary> /// Clears the business object collection and the rows in the data table /// </summary> public void Clear() { BOColTabControlManager.Clear(); }