public void EmailCollectionInstanceOK()
 {
    // //create instance of the class 
     clsEmailAddressCollection AllEmails = new clsEmailAddressCollection();
     //check to see exists
     Assert.IsNotNull(AllEmails);
 }
        void DisplayEmails()
        {
            //create instance of the EmailCollection
            clsEmailAddressCollection Emails = new clsEmailAddressCollection();
            //set the data source to the list of emails in the collection class
            lstBxContacts.DataSource = Emails.AllEmailAddresses;
            //set the data field to display
            lstBxContacts.DisplayMember = "EmailAddress".ToString();
            //set the name of the primary key
            lstBxContacts.ValueMember = "EmailAddressNo";

        }
 public void AllEmailsOK()
 {
     //create instance of the class
     clsEmailAddressCollection Emails = new clsEmailAddressCollection();
     //create some test data
     List<clsEmail> TestList = new List<clsEmail>();
     //add an item to the list
     clsEmail TestItem = new clsEmail();
     //set the properties
     TestItem.EmailAddressNo = 1;
     TestItem.EmailAddress = "*****@*****.**";
     //add the item to the test list
     TestList.Add(TestItem);
     //assign the data
     Emails.AllEmailAddresses = TestList;
     //test to see that the two are the same
     Assert.AreEqual(Emails.AllEmailAddresses, TestList);
 }