You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
771 B
23 lines
771 B
package de.hs_fulda.ciip.projjpn;
|
|
|
|
import junit.framework.TestCase;
|
|
|
|
public class UserTest extends TestCase {
|
|
/**
|
|
* Create User with a valid Birthday and check whether it worked as intended.
|
|
*/
|
|
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);
|
|
}
|
|
}
|