public void WriteOneDSEvents(UUnitTestContext testContext)
    {
        // get Entity Token which is needed for work events
        PlayFabClientAPI.LoginWithCustomID(new LoginWithCustomIDRequest
        {
            CustomId = PlayFabSettings.BuildIdentifier,
            TitleId  = PlayFabSettings.TitleId
        }, loginCallback =>
        {
            PlayFabAuthenticationAPI.GetEntityToken(new GetEntityTokenRequest
            {
                AuthenticationContext = loginCallback.AuthenticationContext
            }, entityCallback =>
            {
#if TPL_35
                Task.Run(() => WriteOneDSEventsAsync(testContext));
#else
                WriteOneDSEventsAsync(testContext);
#endif
            }, entityError =>
            {
                testContext.Skip("EntityToken required!");
            });
        }, loginError =>
        {
            testContext.Skip("Login required!");
        });
    }
Esempio n. 2
0
 public override void SetUp(UUnitTestContext testContext)
 {
     if (!TITLE_INFO_SET)
     {
         testContext.Skip();
     }
 }
 public override void SetUp(UUnitTestContext testContext)
 {
     if (string.IsNullOrEmpty(PlayFabSettings.TitleId) || string.IsNullOrEmpty(PlayFabSettings.DeveloperSecretKey))
     {
         testContext.Skip(); // We cannot do client tests if the titleId is not given
     }
 }
Esempio n. 4
0
        public override void SetUp(UUnitTestContext testContext)
        {
            if (EXEC_ONCE)
            {
                Dictionary<string, string> testInputs;
                string filename = "C:/depot/pf-main/tools/SDKBuildScripts/testTitleData.json"; // TODO: Figure out how to not hard code this
                if (File.Exists(filename))
                {
                    string testInputsFile = PlayFabUtil.ReadAllFileText(filename);

                    testInputs = JsonWrapper.DeserializeObject<Dictionary<string, string>>(testInputsFile, PlayFabUtil.ApiSerializerStrategy);
                }
                else
                {
                    Debug.LogError("Loading testSettings file failed: " + filename + ", loading defaults.");
                    testInputs = new Dictionary<String,String>();
                    testInputs["titleId"] = "6195";
                    testInputs["developerSecretKey"] = "hahahahahafatchance";
                    testInputs["titleCanUpdateSettings"] = "true";
                    testInputs["userName"] = "******";
                    testInputs["userEmail"] = "*****@*****.**";
                    testInputs["userPassword"] = "******";
                }
                SetTitleInfo(testInputs);
                EXEC_ONCE = false;
            }

            if (!TITLE_INFO_SET)
                testContext.Skip(); // We cannot do client tests if the titleId is not given
        }