Esempio n. 1
0
 public Customer GetCustomer(int id)
 {
     try
     {
         _repo.AddRecord(new Customer());
         return(_repo.Find(id));
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Esempio n. 2
0
 public Customer GetCustomer(int id)
 {
     try
     {
         _repo.AddRecord(new Customer());
         //var c = _repo.Find(id);
         return(_repo.Find(id));
     }
     catch (Exception ex)
     {
         _logger.Error("Oops", ex);
         throw;
     }
 }
Esempio n. 3
0
 public Customer GetCustomer(int id)
 {
     try
     {
         _repo.AddRecord(new Customer());
         //call Find(id) more than 1 time
         //Expected invocation on the mock once, but was 4 times: x => x.Find
         //_repo.Find(id); _repo.Find(id); _repo.Find(id);
         return(_repo.Find(id));
     }
     catch (Exception ex)
     {
         throw;
         //return null;
     }
 }
 public void SaveCustomer(Customer customer)
 {
     _repo.AddRecord(customer);
 }