SHARE
TWEET

UserEmail Test V2

Noah-Huppert Nov 3rd, 2014 (edited) 135 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Testing the relationships between Users and UserEmails
  3.  */
  4. public class UserEmailTest {
  5.     /**
  6.      * Tests creating a new User and then adding a UserEmail
  7.      * @param args Not used
  8.      */
  9.     public static main(String[] args){
  10.         User user = new User("userId", null);
  11.  
  12.         user.emails.add(new UserEmail("foo@bazz.com"));
  13.  
  14.         user.emails.get(0).save();
  15.         user.save();
  16.  
  17.         /* Result
  18.             When I look at the database(In phpMyAdmin) I can see that a new user has been created with the Id of "userId"
  19.             However when I look in the user_email table there are no emails
  20.          */
  21.     }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top