Пример #1
0
 public Customer GetCustomer(int id)
 {
     try
     {
         _repo.AddRecord(new Customer());
         return(_repo.Find(id));
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Пример #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;
     }
 }
Пример #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;
     }
 }
Пример #4
0
 public void SaveCustomer(Customer customer)
 {
     _repo.AddRecord(customer);
 }