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); }
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:"*****@*****.**"); }
private void AddUnApprovedUserWithFacebookId() { var usersModel = new Users(); usersModel.Register("*****@*****.**", TestUtil.DefaultUserPassword, TestUtil.DefaultUserPassword); usersModel.SetFacebookUserId("*****@*****.**", long.Parse(ConfigurationManager.AppSettings["FacebookTestUserId"])); }