public async void All() { Mock <ILogger <FollowingRepository> > loggerMoc = FollowingRepositoryMoc.GetLoggerMoc(); ApplicationDbContext context = FollowingRepositoryMoc.GetContext(); var repository = new FollowingRepository(loggerMoc.Object, context); var records = await repository.All(); records.Should().NotBeEmpty(); records.Count.Should().Be(1); }
public async void AllWithSearch() { Mock <ILogger <FollowingRepository> > loggerMoc = FollowingRepositoryMoc.GetLoggerMoc(); ApplicationDbContext context = FollowingRepositoryMoc.GetContext(); var repository = new FollowingRepository(loggerMoc.Object, context); var records = await repository.All(1, 0, DateTime.Parse("1/1/1987 12:00:00 AM").ToString()); records.Should().NotBeEmpty(); records.Count.Should().Be(1); }
public async void All() { Mock <ILogger <FollowingRepository> > loggerMoc = FollowingRepositoryMoc.GetLoggerMoc(); ApplicationDbContext context = FollowingRepositoryMoc.GetContext(); var repository = new FollowingRepository(loggerMoc.Object, context); Following entity = new Following(); context.Set <Following>().Add(entity); await context.SaveChangesAsync(); var record = await repository.All(); record.Should().NotBeEmpty(); }