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