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

  1. package de.hs_fulda.ciip.projjpn;
  2. import junit.framework.TestCase;
  3. public class UserTest extends TestCase {
  4. /**
  5. * Create User with a valid Birthday and check whether it worked as intended.
  6. */
  7. public void test_initAndGetBirthdayOfUser() {
  8. // Given
  9. Customers customers = new Customers();
  10. String firstName = "Mia";
  11. String lastName = "Muster";
  12. String nickName = "harley";
  13. String eMail = "mia@muster.de";
  14. int DD = 30, MM = 12, YYYY = 1997;
  15. String expectedBirthdate = new Birthdate(DD, MM, YYYY).toString();
  16. User userToCheck = new User(firstName, lastName, nickName, eMail, new Birthdate(DD, MM, YYYY));
  17. String gotBirthdate = userToCheck.getBirthdate().toString();
  18. boolean gotExpectedBirthdayBack = gotBirthdate.equals(expectedBirthdate);
  19. }
  20. }