public void DeleteElementsByWebsiteIdTest() { QueriesTableAdapter target = new QueriesTableAdapter(); // TODO: Initialize to an appropriate value Nullable <int> website_id = new Nullable <int>(); // TODO: Initialize to an appropriate value int expected = 0; // TODO: Initialize to an appropriate value int actual; actual = target.DeleteElementsByWebsiteId(website_id); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void ClearWebsiteData(int wid) { var element_ids = from elm in DB.element where (elm.website_id == wid) select elm.id; foreach (var eid in element_ids) { queries.DeleteRecognitionByElementId(eid); SaveChanges("recognition"); } queries.DeleteElementsByWebsiteId(wid); SaveChanges("element"); queries.DeleteWebsiteByID(wid); //SaveChanges("website"); /*<- this is strange because it is removed from the DB before the save took place so I remove it*/ Reload(); }