public void Arrange() { _items = new List <Domain.Entities.Location> { new Domain.Entities.Location { Id = 1, LocationName = "testing" }, new Domain.Entities.Location { Id = 1, LocationName = "test" }, new Domain.Entities.Location { Id = 1, LocationName = "retest" }, new Domain.Entities.Location { Id = 1, LocationName = "different" } }; _locationDataContext = new Mock <ILocationDataContext>(); _locationDataContext.Setup(x => x.Locations).ReturnsDbSet(_items); _locationRepository = new Data.Repository.LocationRepository(_locationDataContext.Object); }
public void Arrange() { _items = new List <Domain.Entities.Location> { new Domain.Entities.Location { Id = 1 }, new Domain.Entities.Location { Id = 2 } }; _locationDataContext = new Mock <ILocationDataContext>(); _locationDataContext.Setup(x => x.Locations).ReturnsDbSet(_items); _locationRepository = new Data.Repository.LocationRepository(_locationDataContext.Object); }
public void Arrange() { _expectedLocation = new Domain.Entities.Location { Id = 4, LocationName = "different", LocalAuthorityName = "test1" }; _items = new List <Domain.Entities.Location> { new Domain.Entities.Location { Id = 1, LocationName = "testing", LocalAuthorityName = "test1" }, new Domain.Entities.Location { Id = 2, LocationName = "test", LocalAuthorityName = "test1" }, new Domain.Entities.Location { Id = 3, LocationName = "retest", LocalAuthorityName = "test1" }, _expectedLocation }; _locationDataContext = new Mock <ILocationDataContext>(); _locationDataContext.Setup(x => x.Locations).ReturnsDbSet(_items); _locationRepository = new Data.Repository.LocationRepository(_locationDataContext.Object); }