public void deleteStore()
        {
            bool expected = false;
            bool result   = manager.Delete(100);

            Assert.AreEqual(expected, result);
        }
Esempio n. 2
0
        private static void DeleteAll()
        {
            Console.WriteLine("Deleting all previously stored data from {0}:", StoreManager.DefaultProvider.Name);
            var nameList = byteArrayNameList.Union(streamNameList);

            foreach (var name in nameList)
            {
                Console.Write("Deleting {0}...", name);
                var result = StoreManager.Delete(name);
                Console.WriteLine(result ? "OK" : "Failed");
            }
            Console.WriteLine();
        }
Esempio n. 3
0
 public ActionResult Delete(Guid id, Store store)
 {
     try
     {
         // TODO: Add delete logic here
         StoreManager.Delete(id);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View(id));
     }
 }
Esempio n. 4
0
        public IHttpActionResult Delete(Store store)
        {
            try
            {
                var mng = new StoreManager();

                mng.Delete(store);

                apiResp         = new ApiResponse();
                apiResp.Message = "Se ha " + store.State + " '" + store.Name + "' correctamente.";

                return(Ok(apiResp));
            }
            catch (BussinessException bex)
            {
                return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message)));
            }
        }