public async void All() { Mock <ILogger <RowVersionCheckRepository> > loggerMoc = RowVersionCheckRepositoryMoc.GetLoggerMoc(); ApplicationDbContext context = RowVersionCheckRepositoryMoc.GetContext(); var repository = new RowVersionCheckRepository(loggerMoc.Object, context); var records = await repository.All(); records.Should().NotBeEmpty(); records.Count.Should().Be(1); }
public async void All() { Mock <ILogger <RowVersionCheckRepository> > loggerMoc = RowVersionCheckRepositoryMoc.GetLoggerMoc(); ApplicationDbContext context = RowVersionCheckRepositoryMoc.GetContext(); var repository = new RowVersionCheckRepository(loggerMoc.Object, context); RowVersionCheck entity = new RowVersionCheck(); context.Set <RowVersionCheck>().Add(entity); await context.SaveChangesAsync(); var record = await repository.All(); record.Should().NotBeEmpty(); }