|
@ -0,0 +1,20 @@ |
|
|
|
|
|
package de.hs_fulda.ciip.projjpn; |
|
|
|
|
|
|
|
|
|
|
|
import junit.framework.TestCase; |
|
|
|
|
|
|
|
|
|
|
|
public class UserTest extends TestCase { |
|
|
|
|
|
public void test_initAndGetBirthdayOfUser() { |
|
|
|
|
|
// Given |
|
|
|
|
|
Customers customers = new Customers(); |
|
|
|
|
|
String firstName = "Mia"; |
|
|
|
|
|
String lastName = "Muster"; |
|
|
|
|
|
String nickName = "harley"; |
|
|
|
|
|
String eMail = "mia@muster.de"; |
|
|
|
|
|
int DD = 30, MM = 12, YYYY = 1997; |
|
|
|
|
|
String expectedBirthdate = new Birthdate(DD, MM, YYYY).toString(); |
|
|
|
|
|
|
|
|
|
|
|
User userToCheck = new User(firstName, lastName, nickName, eMail, new Birthdate(DD, MM, YYYY)); |
|
|
|
|
|
String gotBirthdate = userToCheck.getBirthdate().toString(); |
|
|
|
|
|
boolean gotExpectedBirthdayBack = gotBirthdate.equals(expectedBirthdate); |
|
|
|
|
|
} |
|
|
|
|
|
} |