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