Exemplo n.º 1
0
 public void LinkDeviceToAccountSuccess(UUnitTestContext testContext)
 {
     _emailAuthService.ForceLink      = true;
     _emailAuthService.OnPlayFabLink += (auth, error) =>
     {
         if (error == null)
         {
             testContext.EndTest(UUnitFinishState.PASSED, "Link deviceId success.");
         }
         else
         {
             testContext.Fail("Link deviceId failed with error: " + error.GenerateErrorReport());
         }
     };
     _emailAuthService.Link(new AuthKeys {
         AuthType = AuthTypes.Silent
     });
 }
Exemplo n.º 2
0
    public void InvalidLink(UUnitTestContext testContext)
    {
        var authService = new PlayFabAuthService();

        authService.OnPlayFabLink += (auth, error) =>
        {
            if (error != null)
            {
                testContext.EndTest(UUnitFinishState.PASSED, "Error handle as expected. " + error.GenerateErrorReport());
            }
            else
            {
                testContext.Fail("Error expected.");
            }
        };
        authService.Link(new AuthKeys {
            AuthType = AuthTypes.Facebook
        });
    }