public CoinFlipManager ( IRepoServiceFactory repoServiceFactory, ICoinFlipService coinFlipService, IJackpotDraftService draftService, ICoinFlipHubConnections coinFlipHubConnections, IBetOrWithdrawQueueManager betOrWithdrawQueueManager, IBetHubConnections betHubConnections, ILogServiceFactory logServiceFactory, IBetService betService, IMongoJackpotRepoService jackpotRepoService, IHotStatusManager hotStatusManager, IDiscordService discordService ) { _repoServiceFactory = repoServiceFactory; _coinFlipService = coinFlipService; _draftService = draftService; _coinFlipHubConnections = coinFlipHubConnections; _betOrWithdrawQueueManager = betOrWithdrawQueueManager; _betHubConnections = betHubConnections; _betService = betService; _jackpotRepoService = jackpotRepoService; _hotStatusManager = hotStatusManager; _discordService = discordService; _logService = logServiceFactory.CreateLogger <CoinFlipManager>(); _betQueue = new BetQueue(); Setup().Wait(); }
public CoinFlipController ( ICoinFlipService coinFlipService, IDatabaseConnectionFactory connectionFactory, IItemService itemService, IRepoServiceFactory repoServiceFactory, ICoinFlipManager coinFlipManager, ILogServiceFactory logServiceFactory, IHotStatusManager hotStatusManager ) { _logService = logServiceFactory.CreateLogger <CoinFlipController>(); _coinFlipService = coinFlipService; _itemService = itemService; _repoServiceFactory = repoServiceFactory; _coinFlipManager = coinFlipManager; _hotStatusManager = hotStatusManager; }
public CoinFlipManagerTest() { _fakedRepoServiceFactory = A.Fake <IRepoServiceFactory>(); _fakedCoinFlipMatchRepoService = A.Fake <ICoinFlipMatchRepoService>(); _fakedBetRepoService = A.Fake <IBetRepoService>(); _fakedJackpotSettingRepo = A.Fake <IJackpotSettingRepo>(); _fakedGameModeRepoService = A.Fake <IGameModeRepoService>(); _fakedUserRepoService = A.Fake <IUserRepoService>(); _fakedCoinFlipService = A.Fake <ICoinFlipService>(); _fakedDraftingService = A.Fake <IJackpotDraftService>(); _gameMode = new DatabaseModel.GameMode { CurrentSettingId = 1, Id = 2, IsEnabled = true, Type = "CoinFlip" }; _coinFlipSocketSender = A.Dummy <ICoinFlipHubConnections>(); A.CallTo(() => _fakedRepoServiceFactory.UserRepoService).Returns(_fakedUserRepoService); A.CallTo(() => _fakedRepoServiceFactory.CoinFlipMatchRepoService).Returns(_fakedCoinFlipMatchRepoService); A.CallTo(() => _fakedRepoServiceFactory.BetRepoService).Returns(_fakedBetRepoService); A.CallTo(() => _fakedRepoServiceFactory.JackpotSettingRepo).Returns(_fakedJackpotSettingRepo); A.CallTo(() => _fakedRepoServiceFactory.GameModeRepoService).Returns(_fakedGameModeRepoService); A.CallTo(() => _fakedGameModeRepoService.Find(GameModeHelper.GetStringFromType(GameModeType.CoinFlip))).Returns(_gameMode); _dummyBetOrWithdrawQueueManager = A.Dummy <IBetOrWithdrawQueueManager>(); _dummyBetHubConnection = A.Dummy <IBetHubConnections>(); _dummyBetService = A.Dummy <IBetService>(); _dummyLogServiceFactory = A.Dummy <ILogServiceFactory>(); _dummyMongoJackpotRepoService = A.Dummy <IMongoJackpotRepoService>(); _dummyHotStatusManager = A.Dummy <IHotStatusManager>(); _dummyDiscordService = A.Dummy <IDiscordService>(); }