public async void All()
        {
            Mock <ILogger <TimestampCheckRepository> > loggerMoc = TimestampCheckRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = TimestampCheckRepositoryMoc.GetContext();
            var repository = new TimestampCheckRepository(loggerMoc.Object, context);
            var records    = await repository.All();

            records.Should().NotBeEmpty();
            records.Count.Should().Be(1);
        }
Пример #2
0
        public async void All()
        {
            Mock <ILogger <TimestampCheckRepository> > loggerMoc = TimestampCheckRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = TimestampCheckRepositoryMoc.GetContext();
            var repository = new TimestampCheckRepository(loggerMoc.Object, context);

            TimestampCheck entity = new TimestampCheck();

            context.Set <TimestampCheck>().Add(entity);
            await context.SaveChangesAsync();

            var record = await repository.All();

            record.Should().NotBeEmpty();
        }