public void VipLevel_Creation_Creates_Connection_To_BetLimitGroup_If_Name_Equals() { var betLimitGroup = new BetLimitGroup { Name = TestDataGenerator.GetRandomAlphabeticString(7), ExternalId = TestDataGenerator.GetRandomNumber(50, 1), }; var betLimitGroupId = _gameManagement.CreateBetLimitGroup(betLimitGroup); betLimitGroup = _queries.GetBetLimitGroup(betLimitGroupId); var vipLevelId = CreateVipLevel(betLimitGroup.Name); var betLimitGroupByVipLevel = _queries.GetBetLimitGroupByVipLevel(vipLevelId); Assert.NotNull(betLimitGroupByVipLevel); Assert.AreEqual(betLimitGroup.Id, betLimitGroupByVipLevel.Id); }
public async Task <string> GetPlayerAuthTokenAsync(Guid playerId, string playerIpAddress, PlatformType platformType) { var player = _playerQueries.GetPlayer(playerId); var brandToken = await GetBrandTokenAsync(player.BrandId); var betLimitGroup = _gameQueries.GetBetLimitGroupByVipLevel(player.VipLevelId); var token = await GetApiClient().AuthorizePlayerAsync(new AuthorizePlayerRequest { userid = player.Id.ToString(), ipaddress = playerIpAddress, username = player.Username, //tag = , // need to know more to implement lang = player.CultureCode, cur = player.CurrencyCode, betlimitid = betLimitGroup == null ? 0 : betLimitGroup.ExternalId, // this need to be refactored after UGS will implement separation of betlimitgroups by gameproviders platformtype = platformType, istestplayer = player.InternalAccount, }, brandToken); return(token.authtoken); }