Пример #1
0
        public override void SetUp(UUnitTestContext testContext)
        {
            TestTitleDataLoader.LoadTestTitleData();

            _listener = new EventInstanceListener();
            Callbacks.Clear();
        }
Пример #2
0
        public override void SetUp(UUnitTestContext testContext)
        {
            var testTitleData = TestTitleDataLoader.LoadTestTitleData();

            PlayFabSettings.TitleId = testTitleData.titleId;

            _listener = new EventInstanceListener();
            Callbacks.Clear();
        }
Пример #3
0
        public override void ClassSetUp()
        {
            testTitleData = TestTitleDataLoader.LoadTestTitleData();
            clientApi     = new PlayFabClientInstanceAPI();
            authApi       = new PlayFabAuthenticationInstanceAPI(clientApi.authenticationContext);
            dataApi       = new PlayFabDataInstanceAPI(clientApi.authenticationContext);

            PlayFabSettings.staticPlayer.ForgetAllCredentials();
        }
        public override void ClassSetUp()
        {
            titleData = TestTitleDataLoader.LoadTestTitleData();
            PlayFabSettings.staticSettings.TitleId = titleData.titleId;

            client1 = new PlayFabClientInstanceAPI(player1);
            client2 = new PlayFabClientInstanceAPI(player2);
            auth1   = new PlayFabAuthenticationInstanceAPI(player1);
            auth2   = new PlayFabAuthenticationInstanceAPI(player2);

            PlayFabSettings.staticPlayer.ForgetAllCredentials();
        }
Пример #5
0
        public override void SetUp(UUnitTestContext testContext)
        {
            testTitleData = TestTitleDataLoader.LoadTestTitleData();
            _userEmail    = testTitleData.userEmail;

            // Verify all the inputs won't cause crashes in the tests
            var titleInfoSet = !string.IsNullOrEmpty(PlayFabSettings.TitleId) && !string.IsNullOrEmpty(_userEmail);

            if (!titleInfoSet)
            {
                testContext.Skip(); // We cannot do client tests if the titleId is not given
            }
        }
Пример #6
0
        public override void SetUp(UUnitTestContext testContext)
        {
            testTitleData = TestTitleDataLoader.LoadTestTitleData();
            PlayFabSettings.staticSettings.TitleId            = testTitleData.titleId;
            PlayFabSettings.staticSettings.DeveloperSecretKey = testTitleData.developerSecretKey;

            // Verify all the inputs won't cause crashes in the tests
            var titleInfoSet = !string.IsNullOrEmpty(PlayFabSettings.staticSettings.TitleId) && !string.IsNullOrEmpty(PlayFabSettings.staticSettings.DeveloperSecretKey);

            if (!titleInfoSet)
            {
                testContext.Skip(); // We cannot do client tests if the titleId is not given
            }
        }
Пример #7
0
        public override void SetUp(UUnitTestContext testContext)
        {
            testTitleData = TestTitleDataLoader.LoadTestTitleData();

            // Verify all the inputs won't cause crashes in the tests
            var titleInfoSet = !string.IsNullOrEmpty(PlayFabSettings.TitleId);

            if (!titleInfoSet)
            {
                testContext.Skip(); // We cannot do client tests if the titleId is not given
            }
            if (testTitleData.extraHeaders != null)
            {
                foreach (var pair in testTitleData.extraHeaders)
                {
                    PlayFabHttp.GlobalHeaderInjection[pair.Key] = pair.Value;
                }
            }
        }
Пример #8
0
        public override void ClassSetUp()
        {
#if !UNITY_WSA && !UNITY_WP8
            PlayFabWebRequest.SkipCertificateValidation(); // Internal testing doesn't have a good answer for this yet
#endif

            clientInstance.ForgetAllCredentials();
            PlayFabSettings.staticPlayer.ForgetAllCredentials();

            testTitleData          = TestTitleDataLoader.LoadTestTitleData();
            _userEmail             = testTitleData.userEmail;
            clientSettings.TitleId = testTitleData.titleId;
            if (testTitleData.extraHeaders != null)
            {
                foreach (var pair in testTitleData.extraHeaders)
                {
                    PlayFabHttp.GlobalHeaderInjection[pair.Key] = pair.Value;
                }
            }
        }
Пример #9
0
        public void Start()
        {
            testTitleData = TestTitleDataLoader.LoadTestTitleData(testTitleDataAsset == null ? null : testTitleDataAsset.text);
            suite         = new UUnitTestSuite();
            suite.FindAndAddAllTestCases(typeof(UUnitTestCase), filter);

            if (textDisplay == null)
            {
                var canvas = new GameObject("Canvas", typeof(Canvas)).GetComponent <Canvas>();
                canvas.renderMode = RenderMode.ScreenSpaceOverlay;
                textDisplay       = new GameObject("Test Report", typeof(Text)).GetComponent <Text>();
                textDisplay.font  = Resources.GetBuiltinResource(typeof(Font), "Arial.ttf") as Font;
                var textTransform = textDisplay.rectTransform;
                textTransform.SetParent(canvas.transform, false);
                textTransform.anchorMin        = new Vector2(0, 0);
                textTransform.anchorMax        = new Vector2(1, 1);
                textTransform.pivot            = new Vector2(0, 1);
                textTransform.anchoredPosition = Vector2.zero;
                textTransform.offsetMax        = Vector2.zero;
                textTransform.offsetMin        = Vector2.zero;
            }
        }
Пример #10
0
        public override void SetUp(UUnitTestContext testContext)
        {
#if !UNITY_WSA && !UNITY_WP8
            PlayFabWebRequest.SkipCertificateValidation(); // Internal testing doesn't have a good answer for this yet
#endif
            testTitleData = TestTitleDataLoader.LoadTestTitleData();
            _userEmail    = testTitleData.userEmail;

            // Verify all the inputs won't cause crashes in the tests
            var titleInfoSet = !string.IsNullOrEmpty(PlayFabSettings.TitleId) && !string.IsNullOrEmpty(_userEmail);
            if (!titleInfoSet)
            {
                testContext.Skip(); // We cannot do client tests if the titleId is not given
            }
            if (testTitleData.extraHeaders != null)
            {
                foreach (var pair in testTitleData.extraHeaders)
                {
                    PlayFabHttp.GlobalHeaderInjection[pair.Key] = pair.Value;
                }
            }
        }
Пример #11
0
 public override void SetUp(UUnitTestContext testContext)
 {
     testTitleData                      = TestTitleDataLoader.LoadTestTitleData();
     PlayFabSettings.TitleId            = testTitleData.titleId;
     PlayFabSettings.DeveloperSecretKey = testTitleData.developerSecretKey;
 }
Пример #12
0
 public override void ClassSetUp()
 {
     titleData = TestTitleDataLoader.LoadTestTitleData();
     PlayFabSettings.staticSettings.TitleId = titleData.titleId;
     PlayFabSettings.staticPlayer.ForgetAllCredentials();
 }