private void AddUserWithFacebookId()
        {
            var usersModel = new Users();
            usersModel.Register("*****@*****.**", TestUtil.DefaultUserPassword, TestUtil.DefaultUserPassword);
            usersModel.SetFacebookUserId("*****@*****.**", long.Parse(ConfigurationManager.AppSettings["FacebookTestUserId"]));

            dynamic user = usersModel.Single(where: "Email = @0", args: "*****@*****.**");
            user.IsApproved = true;
            usersModel.Update(user, user.ID);
        }
Ejemplo n.º 2
0
        public static void InitDatabase()
        {
            DynamicModel dm = new DynamicModel("NietoYostenDb", "Albums", "ID");
            dm.Execute("DELETE FROM Pictures");
            dm.Execute("DELETE FROM Albums");
            dm.Execute("DELETE FROM ApprovalRequests");
            dm.Execute("DELETE FROM Users");

            var users = new Users();
            dynamic testUser = users.Register("*****@*****.**", TestUtil.DefaultUserPassword, TestUtil.DefaultUserPassword);
            TestUtil.TestUserId = (int)users.Scalar("SELECT ID FROM Users WHERE Email=@0", args:"*****@*****.**");
        }
Ejemplo n.º 3
0
 private void AddUnApprovedUserWithFacebookId()
 {
     var usersModel = new Users();
     usersModel.Register("*****@*****.**", TestUtil.DefaultUserPassword, TestUtil.DefaultUserPassword);
     usersModel.SetFacebookUserId("*****@*****.**", long.Parse(ConfigurationManager.AppSettings["FacebookTestUserId"]));
 }