public void UpdateMethodOK()
        {
            //create an instance of the class we want to create
            clsCompanyCollection AllCompanies = new clsCompanyCollection();
            //create an item of test data
            clsCompany TestItem = new clsCompany();
            //var to store the primary key
            Int32 PrimaryKey = 0;

            //set it's properties
            TestItem.CompanyID   = 1;
            TestItem.CompanyName = "some company";
            TestItem.Address     = "some address";
            TestItem.PostCode    = "le2 7pt";
            TestItem.TeleNum     = "12345678910";
            TestItem.Email       = "someEmail@com";
            TestItem.Description = "this is an example";
            //set ThisCompany to the test data
            AllCompanies.ThisCompany = TestItem;
            //add the record
            PrimaryKey = AllCompanies.Add();
            //set the primary key of the test data
            TestItem.CompanyID = PrimaryKey;
            //modify the test data
            TestItem.CompanyID   = 2;
            TestItem.CompanyName = "another company";
            TestItem.Address     = "another address";
            TestItem.PostCode    = "sy3 4et";
            TestItem.TeleNum     = "0987654321";
            TestItem.Email       = "someEmail@com";
            TestItem.Description = "this is another example";
            //set the record based on the new test data
            AllCompanies.ThisCompany = TestItem;
            //update the record
            AllCompanies.Update();
            //find the record
            AllCompanies.ThisCompany.Find(PrimaryKey);
            //test to see that the record was not found
            Assert.AreEqual(AllCompanies.ThisCompany, TestItem);
        }
        public void UpdateMethodOK()
        {
            clsCompanyCollection AllCompanies = new clsCompanyCollection();
            clsCompany           TestItem     = new clsCompany();
            string PrimaryKey = "0744121212";

            TestItem.Active          = true;
            TestItem.CompanyName     = "DMU";
            TestItem.CompanyAddress  = "85 street";
            TestItem.Email           = "*****@*****.**";
            TestItem.ContactNo       = "0744121212";
            AllCompanies.ThisCompany = TestItem;
            PrimaryKey               = AllCompanies.Add();
            TestItem.ContactNo       = PrimaryKey;
            TestItem.Active          = false;
            TestItem.CompanyName     = "CEX";
            TestItem.CompanyAddress  = "111 street";
            TestItem.Email           = "*****@*****.**";
            TestItem.ContactNo       = "33";
            AllCompanies.ThisCompany = TestItem;
            AllCompanies.Update();
            //AllCompanies.ThisCompany.Find(PrimaryKey);
            Assert.AreEqual(AllCompanies.ThisCompany, TestItem);
        }