예제 #1
0
        public void TestCreateUser()
        {
            var user = new ParseUser {
                UserName = "******",
                Password = "******"
            };

            user ["phone"] = "415-392-0202";
            var save = user.Save();

            AssertChanged(user, "Id", po => Assert.AreEqual("g7y9tkhB7O", po.Id, "objectId"));
            AssertChanged(user, "sessionToken", po => Assert.AreEqual("pnktnjyb996sj4p156gjtp4im", po.SessionToken, "sessionToken"));
            AssertRequest("POST", "/1/users", "{\"username\":\"cooldude6\",\"password\":\"p_n7!-e8\",\"phone\":\"415-392-0202\"}",
                          201, "{\"createdAt\":\"2011-08-20T02:06:57.931Z\",\"objectId\":\"g7y9tkhB7O\",\"sessionToken\":\"pnktnjyb996sj4p156gjtp4im\"}");
            save.Wait();
            EnforceAsserts();
        }