Пример #1
0
        private void PlayerStatisticsApiContinued1(PlayFabResult <GetPlayerStatisticsResult> getStatResult1, UUnitTestContext testContext, string failMessage)
        {
            foreach (var eachStat in getStatResult1.Result.Statistics)
            {
                if (eachStat.StatisticName == TEST_STAT_NAME)
                {
                    _testInteger = eachStat.Value;
                }
            }
            _testInteger = (_testInteger + 1) % 100; // This test is about the expected value changing (incrementing through from TEST_STAT_BASE to TEST_STAT_BASE * 2 - 1)

            var updateRequest = new UpdatePlayerStatisticsRequest {
                Statistics = new List <StatisticUpdate> {
                    new StatisticUpdate {
                        StatisticName = TEST_STAT_NAME, Value = _testInteger
                    }
                }
            };
            var updateTask = clientApi.UpdatePlayerStatisticsAsync(updateRequest, null, testTitleData.extraHeaders);

            ContinueWithContext(updateTask, testContext, PlayerStatisticsApiContinued2, true, "UpdatePlayerStatistics call failed", false);
        }