Exemplo n.º 1
0
 private IEnumerable <Location> GetAllLocations()
 {
     using (var context = _dataContextFactory.Create())
     {
         return(context.Locations
                .ToList());
     }
 }
Exemplo n.º 2
0
 private void SetUp()
 {
     _factory = Substitute.For <ILocationContextFactory>();
     _context = Substitute.For <ILocationContext>();
     _factory.Create().Returns(_context);
 }