SetCollection() public method

Specify the collection of objects to display and add these to the ListView object
public SetCollection ( IBusinessObjectCollection collection ) : void
collection IBusinessObjectCollection The collection of business objects
return void
 public void TestGetBusinessObject()
 {
     ListView listView = CreateListView();
     ListViewCollectionManager controller = new ListViewCollectionManager(listView);
     BusinessObjectCollection<MyBO> col = GetColWith3Items();
     controller.SetCollection(col);
     //---------------Assert Precondition----------------
     Assert.AreEqual(3, listView.Items.Count);
     //---------------Execute Test ----------------------
     listView.Items[2].Selected = true;
     listView.Items[0].Focused = true;
     //---------------Test Result -----------------------
     Assert.AreEqual(1, listView.SelectedItems.Count);
     Assert.IsNotNull(controller.SelectedBusinessObject);
     Assert.AreSame(col[2], controller.SelectedBusinessObject);
 }
        public void TestSetCollection()
        {
            //---------------Set up test pack-------------------
            ListView listView = CreateListView();
            ListViewCollectionManager controller = new ListViewCollectionManager(listView);
            BusinessObjectCollection<MyBO> col = GetColWith3Items();

            //---------------Assert Precondition----------------
            Assert.AreEqual(0, listView.Items.Count);
            //---------------Execute Test ----------------------
            controller.SetCollection(col);
            //---------------Test Result -----------------------
            Assert.AreEqual(3, listView.Items.Count);
        }
 public void TestRemoveBoFromCollection()
 {
     ListView listView = CreateListView();
     ListViewCollectionManager controller = new ListViewCollectionManager(listView);
     BusinessObjectCollection<MyBO> col = GetColWith3Items();
     controller.SetCollection(col);
     //---------------Assert Precondition----------------
     Assert.AreEqual(3, listView.Items.Count);
     //---------------Execute Test ----------------------
     col.RemoveAt(0);
     //---------------Test Result -----------------------
     Assert.AreEqual(2, listView.Items.Count);
 }