public void Test_0001_ChangePassword_wrongPassword()
        {
            this.LogIn();

            string newPassword = "******";
            string oldPassword = "******";

            // set Response
            client.AddResponse(new CloudException(401,
                                                  "{" +
                                                  "\"errorCode\" : \"WRONG_PASSWORD\"," +
                                                  "\"message\" : \"The provided password is wrong\"," +
                                                  "\"appID\" : \"appId\"," +
                                                  "\"userID\" : \"86f3cdcf-950d-4d26-aa1c-443573de1736\"," +
                                                  "\"suppressed\" : [ ]" +
                                                  "}"));

            bool      done      = false;
            Exception exception = null;

            KiiUser.ChangePassword(newPassword, oldPassword, (Exception e) =>
            {
                done      = true;
                exception = e;
            });

            Assert.IsTrue(done);
            Assert.IsNotNull(exception);
            Assert.IsTrue(exception is CloudException);
        }
        public void Test_0010_ChangePassword_newPassword_null()
        {
            this.LogIn();

            string newPassword = null;
            string oldPassword = "******";

            // set Response
            client.AddResponse(204, "");

            KiiUser.ChangePassword(newPassword, oldPassword);
        }
    void PerformChangePassword(string oldPassword, string newPassword)
    {
        message       = "Changing password...";
        ButtonEnabled = false;

        KiiUser.ChangePassword(newPassword, oldPassword, (Exception e) =>
        {
            ButtonEnabled = true;
            if (e != null)
            {
                message = "Failed to change password " + e.ToString();
                return;
            }
            PerformBack();
        });
    }
        public void Test_0001_ChangePassword_wrongPassword()
        {
            this.LogIn();

            string newPassword = "******";
            string oldPassword = "******";

            // set Response
            client.AddResponse(new CloudException(401,
                                                  "{" +
                                                  "\"errorCode\" : \"WRONG_PASSWORD\"," +
                                                  "\"message\" : \"The provided password is wrong\"," +
                                                  "\"appID\" : \"appId\"," +
                                                  "\"userID\" : \"86f3cdcf-950d-4d26-aa1c-443573de1736\"," +
                                                  "\"suppressed\" : [ ]" +
                                                  "}"));

            KiiUser.ChangePassword(newPassword, oldPassword);
        }
        public void Test_0000_ChangePassword()
        {
            this.LogIn();

            string newPassword = "******";
            string oldPassword = "******";

            // set Response
            client.AddResponse(204, "");

            bool      done      = false;
            Exception exception = null;

            KiiUser.ChangePassword(newPassword, oldPassword, (Exception e) =>
            {
                done      = true;
                exception = e;
            });

            Assert.IsTrue(done);
            Assert.IsNull(exception);
        }