Beispiel #1
0
 public ReportController(
     IMapper mapper,
     IDepartmentRepository departmenRepository,
     IMealtypeRepository mealtypeRepository,
     IEmployeeRepository employeeRepository,
     IDormitoryBlockRepository dormitoryBlockRepository,
     IMealVendorRepository mealVendorRepository,
     IBusTimeRepository busTimeRepository,
     ICounterRepository counterRepository,
     IUserRepository userRepository,
     IMealOrderRepository mealOrderRepository,
     IBusOrderRepository busOrderRepository,
     IMealOrderVerificationRepository mealOrderVerificationRepository,
     IBusOrderVerificationRepository busOrderVerificationRepository
     )
 {
     this.departmentRepository = departmenRepository;
     this.mapper                          = mapper;
     this.mealtypeRepository              = mealtypeRepository;
     this.employeeRepository              = employeeRepository;
     this.dormitoryBlockRepository        = dormitoryBlockRepository;
     this.mealVendorRepository            = mealVendorRepository;
     this.busTimeRepository               = busTimeRepository;
     this.counterRepository               = counterRepository;
     this.userRepository                  = userRepository;
     this.mealOrderRepository             = mealOrderRepository;
     this.busOrderRepository              = busOrderRepository;
     this.mealOrderVerificationRepository = mealOrderVerificationRepository;
     this.busOrderVerificationRepository  = busOrderVerificationRepository;
 }
Beispiel #2
0
 public FirebaseCustomerService(IFirebaseCustomerRepository customerRepository, IAgentService agentService, ICounterRepository counterRepository, IMessageRepository messageRepository)
 {
     _customerRepository = customerRepository;
     _messageRepository  = messageRepository;
     _counterRepository  = counterRepository;
     _agentService       = agentService;
 }
Beispiel #3
0
 public TokenController(ITokenRepository tokenRepository, ICounterRepository counterRepository, ITokenTypeRepository tokenTypeRepository)
 {
     _tokenRepository     = tokenRepository;
     _counterRepository   = counterRepository;
     _tokenTypeRepository = tokenTypeRepository;
     //    _tokenDetailsRepository = tokenDetailsRepository;
 }
Beispiel #4
0
 public UserController(IUserRepository _userRepository,
                       IRatingRepository _ratingRepository,
                       IValidator _validator,
                       IPasswordHasher _passwordHasher,
                       ICounterRepository _counterRepository,
                       IPersistentLoginHandler _loginHandler,
                       ITimedTrainingScoreRepository _timedTrainingScoreRepository,
                       IUserVerifier _userVerifier,
                       IEmailSender _emailSender,
                       IGameRepository _gameRepository,
                       IOptions <Settings> settings)
     : base(_userRepository, _loginHandler)
 {
     userRepository               = _userRepository;
     ratingRepository             = _ratingRepository;
     validator                    = _validator;
     passwordHasher               = _passwordHasher;
     counterRepository            = _counterRepository;
     loginHandler                 = _loginHandler;
     timedTrainingScoreRepository = _timedTrainingScoreRepository;
     userVerifier                 = _userVerifier;
     emailSender                  = _emailSender;
     gameRepository               = _gameRepository;
     recaptchaKey                 = settings.Value.RecaptchaKey;
     requireEmailVerification     = settings.Value.Email.RequireEmailVerification;
 }
 public BaseController()
 {
     this._confServ    = DependencyResolver.Current.GetService <IConfigRepository>();
     this._langServ    = DependencyResolver.Current.GetService <ILangRepository>();
     this._userServ    = DependencyResolver.Current.GetService <IUserRepository>();
     this._counterRepo = DependencyResolver.Current.GetService <ICounterRepository>();
     this._settingServ = DependencyResolver.Current.GetService <ISettingRepository>();
 }
        public static async Task <long> GetCurrentAndIncrementAsync(this ICounterRepository repository)
        {
            var value = await repository.GetCurrentAsync();

            await repository.IncrementAsync();

            return(value);
        }
Beispiel #7
0
 public MessageService(IFirebaseMessageRepository fbMessageRepository, IAttachmentRepository attachmentRepository, IFirebaseStorageFactory storageFactory, ICounterRepository counterRepository, IMessageRepository messageRepository, IOptions <AppSettings> appSettings)
 {
     _fbMessageRepository  = fbMessageRepository;
     _counterRepository    = counterRepository;
     _attachmentRepository = attachmentRepository;
     _messageRepository    = messageRepository;
     _storageFactory       = storageFactory;
     _appSettings          = appSettings;
 }
Beispiel #8
0
        public CounterController(ICounterRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.CounterRepository = repository;
        }
        public CounterController(ICounterRepository repository, string catalog, LoginView view)
        {
            this._LoginId = view.LoginId.ToLong();
            this._UserId = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog = catalog;

            this.CounterRepository = repository;
        }
 public WebPartsController(
     ICounterRepository _counterRepo,
     ILangRepository _langRepo,
     IConfigRepository _confRepo
     )
 {
     this._counterRepo = _counterRepo;
     this._langRepo    = _langRepo;
     this._confServ    = _confRepo;
 }
Beispiel #11
0
 public WorkerRepository(
     CassandraStorage <WorkerStorageElement> storage,
     IMapper mapper,
     ILocker locker,
     ICounterRepository counterRepository)
 {
     this.storage           = storage;
     this.mapper            = mapper;
     this.locker            = locker;
     this.counterRepository = counterRepository;
 }
Beispiel #12
0
 public DailyPekaJob(
     IFcmSender fcmSender,
     ICounterRepository counterRepository,
     IPekaRepository pekaRepository,
     ICockroachPekaRepository cockroachPekaRepository)
 {
     _fcmSender               = fcmSender;
     _counterRepository       = counterRepository;
     _pekaRepository          = pekaRepository;
     _cockroachPekaRepository = cockroachPekaRepository;
 }
        public async Task Consumption_Post_Once()
        {
            _consumptionRepository = new MockConsumptionRepository();
            _counterRepository     = new MockCounterRepository();
            _counterService        = new CounterService(_counterRepository, _consumptionRepository);
            _controller            = new CounterController(_counterService);

            var result = await _controller.CounterCallback(1, 244);

            var okResult = result.Should().BeOfType <OkResult>().Subject;
        }
Beispiel #14
0
 public ThreadService(IThreadRepository threadRepository, IFirebaseThreadRepository fbThreadRepository, IReferralService referralService, IMessageService messageService, IChannelService channelService, IAgentService agentService, ICounterService counterService, ICounterRepository counterRepository, IMessageRepository messageRepository)
 {
     _threadRepository   = threadRepository;
     _fbThreadRepository = fbThreadRepository;
     _messageRepository  = messageRepository;
     _counterRepository  = counterRepository;
     _counterService     = counterService;
     _channelService     = channelService;
     _agentService       = agentService;
     _referralService    = referralService;
     _messageService     = messageService;
 }
 public CustomerRepository(
     CassandraStorage <CustomerStorageElement> storage,
     IMapper mapper,
     ILocker locker,
     ICounterRepository counterRepository,
     CassandraStorage <CustomerIndexByPhoneStorageElement> phoneIndexStorage)
 {
     this.mapper            = mapper;
     this.locker            = locker;
     this.counterRepository = counterRepository;
     this.phoneIndexStorage = phoneIndexStorage;
     this.storage           = storage;
 }
Beispiel #16
0
 public CommentController(ICommentRepository _commentRepository,
                          ICommentVoteRepository _commentVoteRepository,
                          IUserRepository _userRepository,
                          ICounterRepository _counterRepository,
                          IPersistentLoginHandler _loginHandler,
                          INotificationRepository _notificationRepository,
                          IPuzzleRepository _puzzleRepository) : base(_userRepository, _loginHandler)
 {
     commentRepository      = _commentRepository;
     commentVoteRepository  = _commentVoteRepository;
     counterRepository      = _counterRepository;
     notificationRepository = _notificationRepository;
     puzzleRepository       = _puzzleRepository;
 }
 public CalendarRepository(
     ICassandraStorageFactory factory,
     ISerializer serializer,
     IMapper mapper,
     ILocker locker,
     ICounterRepository counterRepository)
 {
     tableName              = RepositoryConstants.GetCalendarTableByType <T>();
     storage                = factory.Get <CalendarDayStorageElement>(RepositoryConstants.KeyspaceName, tableName);
     this.serializer        = serializer;
     this.mapper            = mapper;
     this.locker            = locker;
     this.counterRepository = counterRepository;
 }
Beispiel #18
0
        public CounterController()
        {
            this._LoginId  = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId   = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog  = AppUsers.GetCurrentUserDB();

            this.CounterRepository = new MixERP.Net.Schemas.Office.Data.Counter
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId  = this._UserId
            };
        }
        public CounterController()
        {
            this._LoginId = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog = AppUsers.GetCurrentUserDB();

            this.CounterRepository = new MixERP.Net.Schemas.Office.Data.Counter
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId = this._UserId
            };
        }
        public async Task Counter_Get_One()
        {
            _consumptionRepository = new MockConsumptionRepository();
            _counterRepository     = new MockCounterRepository();
            _counterService        = new CounterService(_counterRepository, _consumptionRepository);
            _controller            = new CounterController(_counterService);

            var result = await _controller.Counter(1);

            // Assert
            var okResult = result.Should().BeOfType <OkObjectResult>().Subject;
            var subject  = okResult.Value.Should().BeAssignableTo <SlimCounterViewModel>().Subject;

            subject.Id.Should().Be("1");
            subject.VillageName.Should().Be("TestVillage1");
        }
Beispiel #21
0
 public PuzzleController(IPuzzlesBeingEditedRepository _puzzlesBeingEdited,
                         IPuzzleRepository _puzzleRepository,
                         IUserRepository _userRepository,
                         IRatingUpdater _ratingUpdater,
                         IMoveCollectionTransformer _movecollectionTransformer,
                         IPuzzleTrainingSessionRepository _puzzleTrainingSessionRepository,
                         ICounterRepository _counterRepository,
                         IPersistentLoginHandler _loginHandler,
                         IGameConstructor _gameConstructor) : base(_userRepository, _loginHandler)
 {
     puzzlesBeingEdited              = _puzzlesBeingEdited;
     puzzleRepository                = _puzzleRepository;
     ratingUpdater                   = _ratingUpdater;
     moveCollectionTransformer       = _movecollectionTransformer;
     puzzleTrainingSessionRepository = _puzzleTrainingSessionRepository;
     counterRepository               = _counterRepository;
     gameConstructor                 = _gameConstructor;
 }
 public UserController(IUserRepository _userRepository,
                       IRatingRepository _ratingRepository,
                       IValidator _validator,
                       IPasswordHasher _passwordHasher,
                       ICounterRepository _counterRepository,
                       IPersistentLoginHandler _loginHandler,
                       ITimedTrainingScoreRepository _timedTrainingScoreRepository,
                       IUserVerifier _userVerifier,
                       IEmailSender _emailSender)
     : base(_userRepository, _loginHandler)
 {
     userRepository               = _userRepository;
     ratingRepository             = _ratingRepository;
     validator                    = _validator;
     passwordHasher               = _passwordHasher;
     counterRepository            = _counterRepository;
     loginHandler                 = _loginHandler;
     timedTrainingScoreRepository = _timedTrainingScoreRepository;
     userVerifier                 = _userVerifier;
     emailSender                  = _emailSender;
 }
        public async Task Counter_Report_All()
        {
            _consumptionRepository = new MockConsumptionRepository();
            _counterRepository     = new MockCounterRepository();
            _counterService        = new CounterService(_counterRepository, _consumptionRepository);
            _controller            = new CounterController(_counterService);

            await _controller.CounterCallback(1, 250);

            await _controller.CounterCallback(1, 240);

            await _controller.CounterCallback(2, 2444);

            var result = await _controller.ConsumptionReport("24");

            var okResult = result.Should().BeOfType <OkObjectResult>().Subject;

            var subject = okResult.Value.Should().BeAssignableTo <TotalVillageReportWrapperViewModel>().Subject;

            subject.Villages.Count().Should().Be(2);

            subject.Villages[0].Consumption.Should().Be(490);
            subject.Villages[1].Consumption.Should().Be(2444);
        }
Beispiel #24
0
 public CounterService(ICounterRepository counterRepository, IConsumptionRepository consumptionRepository)
 {
     _counterRepository     = counterRepository;
     _consumptionRepository = consumptionRepository;
 }
 public void Add(string clave, ICounterRepository repositorio)
 {
     diccionarioRepositorios.Add(clave, repositorio);
 }
 public CounterMutator(ICounterRepository counterRepo, ILogger logger)
 {
     this.counterRepo = counterRepo;
     this.logger = logger;
 }
Beispiel #27
0
 public HomeController(IUserRepository userServ, ICounterRepository _counterRepo)
 {
     this._userServ    = userServ;
     this._counterRepo = _counterRepo;
 }
 /// <summary>
 /// Initializes a new instance of <see cref="ICounterService"/>.
 /// </summary>
 /// <param name="repository"><see cref="ICounterRepository"/>.</param>
 public CounterService(ICounterRepository repository)
 {
     _repository = repository;
 }
 public CounterController(ICounterRepository counterRepository)
 {
     _counterRepository = counterRepository;
 }
 public void SetUp()
 {
     _repo      = A.Fake <ICounterRepository> ();
     _messenger = A.Fake <IMvxMessenger> ();
     _subject   = new CountersService(_repo, _messenger);
 }
Beispiel #31
0
 public SampleDataController(ICounterRepository counterRepository, IHostingEnvironment env)
 {
     _env = env ?? throw new ArgumentNullException(nameof(env));
     _counterRepository = counterRepository ?? throw new ArgumentNullException(nameof(counterRepository));
     _storeType         = counterRepository.GetType().Name;
 }
 public CounterServiceTests()
 {
     _repository = Substitute.For <ICounterRepository>();
 }
 public WidgetController(ICounterRepository counterRepository, ILogger logger)
 {
     this.counterRepository = counterRepository;
     this.logger = logger;
 }
Beispiel #34
0
 public CounterService(ICounterRepository counterRepository, IThreadRepository threadRepository)
 {
     _threadRepository  = threadRepository;
     _counterRepository = counterRepository;
 }