public void SetUp()
        {
            var userProvider  = new UsersDataProvider(_connection);
            var scoreProvider = new ScoreDataProvider(_connection);

            _scoreService = new ScoreService(scoreProvider, userProvider);
        }
 public void Initialize()
 {
     this.context        = MockDbContext.GetContext();
     this.scoreService   = new Mock <IScoreService>().Object;
     this.historyService = new Mock <IHistoryService>().Object;
     this.userService    = new UserService(context, scoreService, historyService);
 }
 public DashboardController(IScoreService scoreService, IUserService userService, IExamService examService, IQuestionService questionService)
 {
     _scoreService    = scoreService;
     _userService     = userService;
     _examService     = examService;
     _questionService = questionService;
 }
示例#4
0
 public void Initialize()
 {
     _scoreService = new ScoreService();
     //here we use a single fake data to test the project
     // this should be return a int 9
     _FakeData = "{{{},{}}}";
 }
示例#5
0
    private void Init(IHealthService healthService, IScoreService scoreService)
    {
        this.scoreService  = scoreService;
        this.healthService = healthService;

        healthService.Setup(levelConfiguration.maxHealth);
    }
示例#6
0
 public ScoreDriver(IScoreService scoreService, ICupService cupService, IEventService eventService, ITeamService teamService)
 {
     _scoreService = scoreService;
     _cupService   = cupService;
     _eventService = eventService;
     _teamService  = teamService;
 }
示例#7
0
 public UsersController(IUserService userService, IAdminService adminService, IScoreService scoreService, IHistoryService historyService)
 {
     this.userService    = userService;
     this.adminService   = adminService;
     this.scoreSerice    = scoreService;
     this.historyService = historyService;
 }
示例#8
0
        public PageAnalysisService(IScoreService scoreService, IByteSizeHelper byteSizeHelper, IEnumerable <ISummary> summaries,
                                   ITemplateHelper templateHelper, INodeReportRepository nodeReportService, IPageScoreSerializer pageScoreSerializer)
        {
            if (scoreService == null)
            {
                throw new ArgumentNullException(nameof(scoreService));
            }
            if (byteSizeHelper == null)
            {
                throw new ArgumentNullException(nameof(byteSizeHelper));
            }
            if (summaries == null)
            {
                throw new ArgumentNullException(nameof(summaries));
            }
            if (templateHelper == null)
            {
                throw new ArgumentNullException(nameof(templateHelper));
            }
            if (nodeReportService == null)
            {
                throw new ArgumentNullException(nameof(nodeReportService));
            }
            if (pageScoreSerializer == null)
            {
                throw new ArgumentNullException(nameof(pageScoreSerializer));
            }

            _scoreService         = scoreService;
            _byteSizeHelper       = byteSizeHelper;
            _summaries            = summaries;
            _templateHelper       = templateHelper;
            _nodeReportRepository = nodeReportService;
            _pageScoreSerializer  = pageScoreSerializer;
        }
 public ScoreController(ApplicationDbContext db, UserManager <User> userManager, IScoreService scoreService, ICategoryService categoryService)
 {
     this.db              = db;
     this.userManager     = userManager;
     this.scoreService    = scoreService;
     this.categoryService = categoryService;
 }
示例#10
0
 public NoteRenderStrategy(IMeasurementService measurementService, IAlterationService alterationService, IScoreService scoreService, IBeamingService beamingService)
 {
     this.measurementService = measurementService;
     this.alterationService  = alterationService;
     this.scoreService       = scoreService;
     this.beamingService     = beamingService;
 }
示例#11
0
 public Engine(
     IAccountService accountService,
     IGovernmentService governmentService,
     IGroupService groupService,
     IReportService reportService,
     IPlotService plotService,
     IDecisionService decisionService,
     IAudienceService audienceService,
     INewsService newsService,
     IRevolutionService revolutionService,
     IScoreService scoreService,
     IEscapeService escapeService,
     IAssassinationService assassinationService,
     ILoanService loanService,
     IWarService warService)
 {
     this.accountService       = accountService;
     this.governmentService    = governmentService;
     this.groupService         = groupService;
     this.reportService        = reportService;
     this.plotService          = plotService;
     this.decisionService      = decisionService;
     this.audienceService      = audienceService;
     this.newsService          = newsService;
     this.revolutionService    = revolutionService;
     this.scoreService         = scoreService;
     this.escapeService        = escapeService;
     this.assassinationService = assassinationService;
     this.loanService          = loanService;
     this.warService           = warService;
 }
 public ScoreServiceCalculateScoresTests()
 {
     ScoreService = new ScoreService();
     CategoryTotalMaxScoreRepository = MockRepository.GenerateStub<IRepository<CategoryTotalMaxScore>>();
     Repository = MockRepository.GenerateStub<IRepository>();
     Repository.Expect(a => a.OfType<CategoryTotalMaxScore>()).Return(CategoryTotalMaxScoreRepository).Repeat.Any();
     SetupTotalMaxScores();
 }
示例#13
0
 public ReportService(LGAContext context)
 {
     _context = context;
     //Report Service is acting like a logic layer to combine data contexts and present the desired output,
     //hence added concrete coupling to ScoreService.
     _scoreService = new ScoreService(context);
     _stateService = new StateService(context);
 }
 public ReservationController(IReservationService reservationService, ITeeTimesService teetimeService,
                              IScoreService scoreService, IMemberService memberService)
 {
     _reservationService = reservationService;
     _teetimeService     = teetimeService;
     _scoreService       = scoreService;
     _memberService      = memberService;
 }
示例#15
0
        public Game(int numberOfFrames, IScoreService scoreService)
        {
            _totalFrames = numberOfFrames;

            _scoreService = scoreService;

            InitializeFrames();
        }
示例#16
0
 public UserController(IMenuService menu, IUserService user, IReviewService review, IOrderService order, IScoreService score)
 {
     menuService   = menu;
     userService   = user;
     reviewService = review;
     orderService  = order;
     scoreService  = score;
 }
示例#17
0
 public AdminController(IAdminService service, IScoreService score, IUserService user, IMenuService menu, IOrderService order)
 {
     adminService = service;
     scoreService = score;
     userService  = user;
     menuService  = menu;
     orderService = order;
 }
示例#18
0
        public ScoresController(IScoreService scoreService)
        {
            if (scoreService == null)
            {
                throw new ArgumentNullException("scoreService");
            }

            _scoreService = scoreService;
        }
 public StatisticService(IScoreService scoreService, IReviewService reviewService, IExamService examService, IScoreRepository scoreRepository, IExamRepository examRepository, IUserRepository userRepository)
 {
     this.scoreService    = scoreService;
     this.reviewService   = reviewService;
     this.examService     = examService;
     this.scoreRepository = scoreRepository;
     this.examRepository  = examRepository;
     this.userRepository  = userRepository;
 }
 public KnowledgeTestController(IKnowledgeTestService knowledgeTestService, IQueryableRepository <KnowledgeTest> queryableRepository, IQueryableRepository <vwRP_StockCount> totalRowsRepository, IQueryableRepository <Answer> answerQueryableRepository, IAnswerService answerService, IScoreService scoreService)
 {
     _knowledgeTestService      = knowledgeTestService;
     _queryableRepository       = queryableRepository;
     _totalRowsRepository       = totalRowsRepository;
     _answerQueryableRepository = answerQueryableRepository;
     _answerService             = answerService;
     _scoreService = scoreService;
 }
 public CreditService(
     IUnitOfWorkFactory unitOfWorkFactory,
     IMapper mapper,
     IScoreService scoreService)
 {
     this.unitOfWorkFactory = unitOfWorkFactory;
     this.mapper            = mapper;
     this.scoreService      = scoreService;
 }
示例#22
0
 public LinkAccountsStrategy()
 {
     _yodleeService         = ObjectFactory.GetInstance <IYodleeService>();
     _accountService        = ObjectFactory.GetInstance <IAccountService>();
     _pendingActionsService = ObjectFactory.GetInstance <PendingActionService>();
     _taskService           = ObjectFactory.GetInstance <ITaskService>();
     _batchTasksNotifier    = ObjectFactory.GetInstance <IBatchTasksNotifier>();
     _scoreService          = ObjectFactory.GetInstance <IScoreService>();
 }
 public SubjectController(
     ISubjectService subjectService,
     IMapper mapper,
     IScoreService scoreService)
 {
     this.subjectService = subjectService;
     this.mapper         = mapper;
     this.scoreService   = scoreService;
 }
示例#24
0
 public TriviaGameService(
     IScoreService scoreService,
     IWorkflowService workflowService,
     IDelayedSlackService delayedSlackService
     )
 {
     _scoreService        = scoreService;
     _workflowService     = workflowService;
     _delayedSlackService = delayedSlackService;
 }
        public ScoreAdminController(IOrchardServices orchardServices, IScoreService scoreService, ITeamService teamService, ISiteService siteService, IShapeFactory shapeFactory)
        {
            _orchardServices = orchardServices;
            _siteService     = siteService;
            _scoreService    = scoreService;
            _teamService     = teamService;

            Shape = shapeFactory;
            T     = NullLocalizer.Instance;
        }
示例#26
0
 public HomeController(IApiCallerService apiCallerService, IProjectRepository projectRepository,
                       IReportRepository reportRepository, IScoreService scoreService,
                       IOssIndexStatusService ossIndexStatusService)
 {
     _apiCallerService      = apiCallerService;
     _projectRepository     = projectRepository;
     _reportRepository      = reportRepository;
     _scoreService          = scoreService;
     _ossIndexStatusService = ossIndexStatusService;
 }
示例#27
0
 public ScoreModule(
     IConfiguration configuration,
     ILogger <ScoreModule> logger,
     IScoreService scoreService
     )
 {
     this.configuration = configuration;
     this.logger        = logger;
     this.scoreService  = scoreService;
 }
示例#28
0
 public SaleController(ISaleService saleService, IQueryableRepository <Sale> queryableRepository, IQueryableRepository <vwRP_StockCount> totalRowsRepository, IUserService userService, IProductService productService, IQueryableRepository <Product> productQueryableRepository, IQueryableRepository <User> userQueryableRepository, IScoreService scoreService)
 {
     _saleService                = saleService;
     _queryableRepository        = queryableRepository;
     _totalRowsRepository        = totalRowsRepository;
     _userService                = userService;
     _productService             = productService;
     _productQueryableRepository = productQueryableRepository;
     _userQueryableRepository    = userQueryableRepository;
     _scoreService               = scoreService;
 }
示例#29
0
 public ScheduleController(IScheduleService scheduleService,
                           ISpecialTaskService specialTaskService,
                           RoleManager <IdentityRole> roleManager,
                           IUserService userService, IScoreService scoreService)
     : base(roleManager)
 {
     _scheduleService        = scheduleService;
     this.specialTaskService = specialTaskService;
     _userService            = userService;
     _scoreService           = scoreService;
 }
 public CompanyService(
     ICompanySearchService companySearchService,
     IAnnualReportService annualReportService,
     IScoreService scoreService,
     ICompanyFactory companyFactory)
 {
     this.companySearchService = companySearchService;
     this.annualReportService  = annualReportService;
     this.scoreService         = scoreService;
     this.companyFactory       = companyFactory;
 }
示例#31
0
        //////////////////////////////////////////////////////////////////////////////////
        // Monobehaviour Events
        //

        void Awake()
        {
            registry = IOC.Resolve<IRegistryService>();

            collectables = IOC.Resolve<ICollectableFactory>();

            score = IOC.Resolve<IScoreService>();

            rigid = GetComponent<Rigidbody>();
            rigid.useGravity = false;
            rigid.constraints = RigidbodyConstraints.FreezeRotation;
        }
示例#32
0
        public static void TupletMark(IMeasurementService measurementService, IScoreService scoreService, ScoreRendererBase renderer, NoteOrRest element, int beamLoop)
        {
            if (measurementService.TupletState == null)
            {
                throw new Exception("DrawTupletMark was called but no tuplet is currently open in staff.");
            }
            Staff staff = scoreService.CurrentStaff;

            NoteOrRest           firstElementInTuplet = staff.Peek <NoteOrRest>(element, PeekType.BeginningOfTuplet);
            int                  index = staff.Elements.IndexOf(firstElementInTuplet);
            List <MusicalSymbol> elementsUnderTuplet = staff.Elements.GetRange(index, staff.Elements.IndexOf(element) - index);
            var                  elementsUnderTupletForAverageStemLength = elementsUnderTuplet.OfType <Note>().Where(n => MusicalSymbol.DirectionToPlacement(n.StemDirection) == measurementService.TupletState.TupletPlacement).ToList();
            double               averageStemLength = elementsUnderTupletForAverageStemLength.Count == 0 ? 0 : elementsUnderTupletForAverageStemLength.Average(n => n.ActualStemLength);

            averageStemLength += 10;                //Add space
            int    placementMod = measurementService.TupletState.TupletPlacement == VerticalPlacement.Above ? -1 : 1;
            double tupletBracketStartXPosition = firstElementInTuplet.TextBlockLocation.X + 6;
            double tupletBracketStartYPosition = firstElementInTuplet.TextBlockLocation.Y + 25 + averageStemLength * placementMod;
            double tupletBracketEndXPosition   = element.TextBlockLocation.X + 12;
            double tupletBracketEndYPosition   = element.TextBlockLocation.Y + 25 + averageStemLength * placementMod;

            if (measurementService.TupletState.AreSingleBeamsPresentUnderTuplet)                //Draw tuplet bracket
            {
                renderer.DrawLine(new Point(tupletBracketStartXPosition, tupletBracketStartYPosition),
                                  new Point(tupletBracketEndXPosition, tupletBracketEndYPosition), element);
                renderer.DrawLine(new Point(tupletBracketStartXPosition, tupletBracketStartYPosition),
                                  new Point(tupletBracketStartXPosition, firstElementInTuplet.TextBlockLocation.Y + 25 + (averageStemLength - 4) * placementMod), element);
                renderer.DrawLine(new Point(tupletBracketEndXPosition, tupletBracketEndYPosition),
                                  new Point(tupletBracketEndXPosition, element.TextBlockLocation.Y + 25 + (averageStemLength - 4) * placementMod), element);
            }

            double numberOfNotesYTranslation = 0;

            if (measurementService.TupletState.TupletPlacement == VerticalPlacement.Above)
            {
                numberOfNotesYTranslation -= 18;                                                                                        //If text should appear above the tuplet, move a bit to up
            }
            //If bracket is not drawn, move up or down to fill space
            if (!measurementService.TupletState.AreSingleBeamsPresentUnderTuplet)
            {
                numberOfNotesYTranslation += 10 * (measurementService.TupletState.TupletPlacement == VerticalPlacement.Above ? 1 : -1);
            }

            var allElementsUnderTuplet = elementsUnderTuplet.OfType <NoteOrRest>().ToList();

            allElementsUnderTuplet.Add(element);
            var tupletNumber = CalculateTupletNumber(allElementsUnderTuplet);

            renderer.DrawString(Convert.ToString(tupletNumber), MusicFontStyles.LyricsFont,
                                new Point(tupletBracketStartXPosition + (tupletBracketEndXPosition - tupletBracketStartXPosition) / 2 - 6,
                                          tupletBracketStartYPosition + (tupletBracketEndYPosition - tupletBracketStartYPosition) / 2 + numberOfNotesYTranslation), element);
        }
示例#33
0
 public PostReactionCreationService(
     IUnitOfWorkFactory unitOfWorkFactory,
     IQueryService queryService,
     IApiResultService apiResultService,
     IUserService userService,
     IScoreService scoreService)
 {
     this.unitOfWorkFactory = unitOfWorkFactory;
     this.queryService      = queryService;
     this.apiResultService  = apiResultService;
     this.userService       = userService;
     this.scoreService      = scoreService;
 }
示例#34
0
        // MonoBehaviour
        //

        void Awake() {
            // time service
            time = IOC.Resolve<ITimeService>();
            time.TimeUpdated += UpdateTimeText;

            // score service
            score = IOC.Resolve<IScoreService>();
            score.ScoreUpdated += UpdateScoreText;

            // registry service
            registry = IOC.Resolve<IRegistryService>();
            registry.Register<IGameUI>("GameUI", this);

            // animator component
            animator = GetComponent<Animator>();

            // game ready behaviour
            gameReadyBehaviour = animator.GetBehaviour<GameReadyBehaviour>();
            gameReadyBehaviour.gameUI = this;
        }
        public AuthScoreServiceWrapper(
            IScoreService scoreService,
            ClaimsPrincipal principal,
            EntityValidator entityValidator,
            IUserStore<IUserDto, int> userStore,
            ClaimsAuthorizationManager authorizationManager)
        {
            if (scoreService == null)
            {
                throw new ArgumentNullException("scoreService");
            }

            if (principal == null)
            {
                throw new ArgumentNullException("principal");
            }

            if (entityValidator == null)
            {
                throw new ArgumentNullException("entityValidator");
            }

            if (userStore == null)
            {
                throw new ArgumentNullException("userStore");
            }

            if (authorizationManager == null)
            {
                throw new ArgumentNullException("authorizationManager");
            }

            _scoreService = scoreService;
            _principal = principal;
            _entityValidator = entityValidator;
            _userStore = userStore;
            _authorizationManager = authorizationManager;
        }
示例#36
0
 public ScoreDetailsService(IMetricRepository metricRepository, IScoreService scoreService)
 {
     this.metricRepository = metricRepository;
     this.scoreService = scoreService;
 }
 public SurveyResponseController(IRepository<SurveyResponse> surveyResponseRepository, IScoreService scoreService, IRepository<Photo> photoRepository, IBlobStoargeService blobStoargeService)
 {
     _surveyResponseRepository = surveyResponseRepository;
     _scoreService = scoreService;
     _photoRepository = photoRepository;
     _blobStoargeService = blobStoargeService;
 }
 public ScoreServiceQuestionTests()
 {
     ScoreService = new ScoreService();
     QuestionRepository = MockRepository.GenerateStub<IRepository<Question>>();
     SetupQuestions();
 }
示例#39
0
 public Game(IScoreService service)
 {
     Board = getNewBoard();
     CurrrentPlayer = 0;
     this.scoreService = service;
 }