示例#1
0
        public void CreateUpdateDelete()
        {
            var u = new UserUpsert {
                Email          = "*****@*****.**",
                Bio            = "bio",
                CanCreateGroup = true,
                IsAdmin        = true,
                Name           = "sadfasdf",
                Password       = "******",
                ProjectsLimit  = 1000,
                Skype          = "skype",
                Twitter        = "twitter",
                Username       = "******",
                WebsiteUrl     = "wp.pl"
            };

            var addedUser = users.Create(u);

            Assert.AreEqual(u.Bio, addedUser.Bio);

            u.Bio   = "Bio2";
            u.Email = "*****@*****.**";

            var updatedUser = users.Update(addedUser.Id, u);

            Assert.AreEqual(u.Bio, updatedUser.Bio);

            users.Delete(addedUser.Id);
        }