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

            records.Should().NotBeEmpty();
            records.Count.Should().Be(1);
        }
Esempio n. 2
0
        public async void All()
        {
            Mock <ILogger <QuoteTweetRepository> > loggerMoc = QuoteTweetRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = QuoteTweetRepositoryMoc.GetContext();
            var repository = new QuoteTweetRepository(loggerMoc.Object, context);

            QuoteTweet entity = new QuoteTweet();

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

            var record = await repository.All();

            record.Should().NotBeEmpty();
        }