Exemple #1
0
        public async void All()
        {
            Mock <ILogger <BucketRepository> > loggerMoc = BucketRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = BucketRepositoryMoc.GetContext();
            var repository = new BucketRepository(loggerMoc.Object, context);
            var records    = await repository.All();

            records.Should().NotBeEmpty();
            records.Count.Should().Be(1);
        }
Exemple #2
0
        public async void AllWithSearch()
        {
            Mock <ILogger <BucketRepository> > loggerMoc = BucketRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = BucketRepositoryMoc.GetContext();
            var repository = new BucketRepository(loggerMoc.Object, context);

            var records = await repository.All(1, 0, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da").ToString());

            records.Should().NotBeEmpty();
            records.Count.Should().Be(1);
        }
Exemple #3
0
        public async void All()
        {
            Mock <ILogger <BucketRepository> > loggerMoc = BucketRepositoryMoc.GetLoggerMoc();
            ApplicationDbContext context = BucketRepositoryMoc.GetContext();
            var repository = new BucketRepository(loggerMoc.Object, context);

            Bucket entity = new Bucket();

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

            var record = await repository.All();

            record.Should().NotBeEmpty();
        }