Exemplo n.º 1
0
 public Customer GetCustomer(int id)
 {
     try
     {
         _repo.AddRecord(new Customer());
         return(_repo.Find(id));
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Exemplo 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;
     }
 }
Exemplo 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;
     }
 }
Exemplo n.º 4
0
 public void SaveCustomer(Customer customer)
 {
     _repo.AddRecord(customer);
 }