Esempio n. 1
0
 public Boolean updateStore(Store newStore)
 {
     foreach (Store s in stores)
     {
         if (s.getStoreId() == newStore.getStoreId())
         {
             SDB.Remove(s);
             stores.Remove(s);
             SDB.Add(newStore);
             stores.AddLast(newStore);
             return(true);
         }
     }
     return(false);
 }
 public void RemoveStore()
 {
     try
     {
         Store toRemove = new Store(1, "halavi", itamar);
         storeDB.Remove(toRemove);
         li = storeDB.Get();
         Assert.AreEqual(li.Count, 0);
     }
     catch (Exception e)
     { Assert.AreEqual(true, false, "there was a connection error to the testing db"); }
 }