public void Remove() { try { usDB.Remove(Tuple.Create(1, "itamar", 1)); li = usDB.Get(); Assert.AreEqual(li.Count, 0); } catch (Exception e) { Assert.AreEqual(true, false, "there was a connection error to the testing db"); } }
public void removeFromCategory(StoreRole storeRole, NotificationCategories category) { if (!usersPreferences.ContainsKey(category)) { return; } foreach (StoreRole sR in usersPreferences[category]) { if (sR.user.getUserName() == storeRole.user.getUserName() && sR.store.getStoreId() == storeRole.store.getStoreId()) { UNPDB.Remove(new Tuple <int, string, int>((int)category, storeRole.getUser().getUserName(), storeRole.getStore().getStoreId())); usersPreferences[category].Remove(sR); return; } } }