Exemplo n.º 1
0
 public RealDatabaseQuerier(IDbContextFactory dbContextFactory, IDbToAppModelConverter dbToAppModelConverter,
                            IAppToDbModelConverter appToDbModelConverter)
 {
     _dbContextFactory      = dbContextFactory;
     _dbToAppModelConverter = dbToAppModelConverter;
     _appToDbModelConverter = appToDbModelConverter;
 }
 public void UnitTestSetup()
 {
     _fakeAppToDbModelConverter = Substitute.For <IAppToDbModelConverter>();
     _fakeDbToAppModelConverter = Substitute.For <IDbToAppModelConverter>();
     _fakeDbContextFactory      = Substitute.For <IDbContextFactory>();
     _fakeDbContext             = Substitute.For <IAppDbContext>();
     _fakeDbContextFactory.GetContext().Returns(_fakeDbContext);
     _uut = new RealDatabaseQuerier(_fakeDbContextFactory, _fakeDbToAppModelConverter, _fakeAppToDbModelConverter);
 }