public GiftAidController(IGiftAidRepository aidRepository, IGiftAidCalculationService aidCalculationService,
                          IDeclarationService declarationService)
 {
     _aidRepository         = aidRepository;
     _aidCalculationService = aidCalculationService;
     _declarationService    = declarationService;
 }
Exemple #2
0
 public PhoneConfirmViewModel(IPhoneConfirmService loginService, PageService pageService, IDeclarationService declarationService) : base(pageService)
 {
     this.loginService       = loginService;
     this.pageService        = pageService;
     this.declarationService = declarationService;
     SendCodeFull();
     DefinePhoneNumber();
 }
Exemple #3
0
        private void Setup()
        {
            var options = new DbContextOptionsBuilder <GiftAidDbContext>()
                          .UseInMemoryDatabase(databaseName: "GiftAidDb").Options;

            _dbContext          = new GiftAidDbContext(options);
            _calculationService = new GiftAidCalculationService();
            _declarationService = new DeclarationService(_calculationService);
        }
        public DeclarationControllerTest()
        {
            RepositoryContext dbContext = new RepositoryContext(
                new DbContextOptionsBuilder <RepositoryContext>()
                .UseInMemoryDatabase($"db-{Guid.NewGuid()}")
                .Options
                );
            IUnitofWork uow = new UnitofWork(dbContext);

            _service    = new DeclarationService(uow);
            _controller = new DeclarationController(_service);
        }
        public RabbitConnection(
            IDeclarationService declarationService,
            IServiceProvider serviceProvider,
            IConfiguration configuration,
            IOptions <OwlerySettings> settings,
            ILoggerFactory factory)
        {
            this.declarationService = declarationService;
            this.serviceProvider    = serviceProvider;
            this.configuration      = configuration;
            this.settings           = settings.Value;
            this.logger             = factory.CreateLogger <RabbitConnection>();
            this.loggerFactory      = factory;

            this.consumers = new List <RabbitConsumer>();
        }
 private void Setup()
 {
     _calculationService = new GiftAidCalculationService();
     _declarationService = new DeclarationService(_calculationService);
 }
 public DeclarationController(IDeclarationService service)
 {
     _service = service;
 }