Advertisement
Noah-Huppert

UserEmail Test V1

Nov 3rd, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  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.save();
  15.  
  16.         /* Result
  17.             When I look at the database(In phpMyAdmin) I can see that a new user has been created with the Id of "userId"
  18.             However when I look in the user_email table there are no emails
  19.          */
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement