@@ -0,0 +1,1741 @@
+package com.twu.biblioteca.user;%0A%0Aimport com.twu.biblioteca.com.twu.biblioteca.exceptions.InvalidLibraryNumberFormatException;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0A/**%0A * Created by watsonarw on 25/04/15.%0A */%0Apublic class UserTest %7B%0A%0A    @Test%0A    public void testToStringReturnsLibraryNumber() %7B%0A        User u = new User(%22123-4567%22, %22Joe Citizen%22, %22joe@email.com%22, %22+61 412 345 678%22, %22password%22);%0A        assertEquals(%22123-4567%22, u.toString());%0A    %7D%0A%0A    @Test%0A    public void testGetDetailsShowsDetailsWhenAllExist() %7B%0A        User u = new User(%22123-4567%22, %22Joe Citizen%22, %22joe@email.com%22, %22+61 412 345 678%22, %22password%22);%0A        String expected = %22User details for 123-4567%5Cn%22 +%0A                          %22Name:  Joe Citizen%5Cn%22 +%0A                          %22Email: joe@email.com%5Cn%22 +%0A                          %22Phone: +61 412 345 678%5Cn%22;%0A        assertEquals(expected, u.getDetails());%0A    %7D%0A%0A    @Test%0A    public void testGetDetailsShowsWhenDetailsDontAllExist() %7B%0A        User u = new User(%22123-4567%22, %22%22, %22%22, %22%22, %22password%22);%0A        String expected = %22User details for 123-4567%5Cn%22 +%0A                %22Name:  %5Cn%22 +%0A                %22Email: %5Cn%22 +%0A                %22Phone: %5Cn%22;%0A        assertEquals(expected, u.getDetails());%0A    %7D%0A%0A    @Test(expected = InvalidLibraryNumberFormatException.class)%0A    public void testUserCantBeCreatedWithInvalidLibraryNumber() %7B%0A        User u = new User(%22123.4567%22, %22Joe Citizen%22, %22joe@email.com%22, %22+61 412 345 678%22, %22password%22);%0A        String expected = %22User details for 123-4567%5Cn%22 +%0A                %22Name:  Joe Citizen%5Cn%22 +%0A                %22Email: joe@email.com%5Cn%22 +%0A                %22Phone: +61 412 345 678%5Cn%22;%0A        assertEquals(expected, u.getDetails());%0A    %7D%0A%7D%0A

Add Test for User