public LocationRepositoryTest() { dbContext = new Mock <IDatabaseContext>(); Mock <DbSet <Location> > locationsMock = DbContextTestUtils.CreateDbSetMock(mockLocationsList); dbContext.Setup(context => context.Locations).Returns(locationsMock.Object); repository = new LocationRepository(dbContext.Object); }
public UserRepositoryTest() { dbContext = new Mock <IDatabaseContext>(); mockUsersList = populateMockUsersList(); Mock <DbSet <User> > usersMock = DbContextTestUtils.CreateDbSetMock(mockUsersList); dbContext.Setup(context => context.Users).Returns(usersMock.Object); repository = new UserRepository(dbContext.Object); }