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

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

            Pipeline entity = new Pipeline();

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

            var record = await repository.All();

            record.Should().NotBeEmpty();
        }