Ejemplo n.º 1
0
        public void CreateTwitter()
        {
            var name   = "hatsune_miku";
            var result = data.CreateTwitter("auth_token", name, "*****@*****.**", 39, "Miku_Crypton", "crypton.jp");

            Assert.IsNotNull(result, "Result is not null");
            Assert.AreEqual(name, result.Name, "Name");

            var user = GetUserFromRepo(name);

            Assert.IsNotNull(user, "User found in repository");
            Assert.AreEqual(name, user.Name, "Name");
            Assert.AreEqual("*****@*****.**", user.Email, "Email");
            Assert.AreEqual(UserGroupId.Regular, user.GroupId, "GroupId");

            Assert.AreEqual("auth_token", user.Options.TwitterOAuthToken, "TwitterOAuthToken");
            Assert.AreEqual(39, user.Options.TwitterId, "TwitterId");
            Assert.AreEqual("Miku_Crypton", user.Options.TwitterName, "TwitterName");
        }