Exemplo n.º 1
0
 public void ShouldRestoreSession(Cloud cloud)
 {
     cloud.Login(
         network: LoginNetwork.Email,
         networkId: "*****@*****.**",
         networkSecret: "Password123")
     // Resume the session with the credentials just received
     .Then(gamer => cloud.ResumeSession(
         gamerId: gamer.GamerId,
         gamerSecret: gamer.GamerSecret))
     .Then(resumeResult => {
         Assert(resumeResult != null, "Resume failed");
     })
     .CompleteTestIfSuccessful();
 }
Exemplo n.º 2
0
 public void ShouldNotRestoreInexistingSession(Cloud cloud)
 {
     // Resume the session with the credentials just received
     cloud.ResumeSession(
         gamerId: "15555f06c7b852423cb9074a",
         gamerSecret: "1f89a1efa49a3cf59d00f8badb03227d1b56840b")
     .ExpectFailure(resumeResult => {
         Assert(resumeResult.HttpStatusCode == 401, "401 status code expected");
         Assert(resumeResult.ServerData["name"] == "LoginError", "LoginError expected");
         CompleteTest();
     });
 }