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 }); }
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 }); }