|
@ -0,0 +1,20 @@ |
|
|
|
|
|
package hs.fulda.de.ci.exam.project; |
|
|
|
|
|
|
|
|
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
|
|
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertEquals; |
|
|
|
|
|
|
|
|
|
|
|
public class AccountTest { |
|
|
|
|
|
@Test |
|
|
|
|
|
void test_resetPassword(){ |
|
|
|
|
|
Account account1 = new Account("123", "password", Account.AccountStatus.ACTIVE); |
|
|
|
|
|
Account account2 = new Account("453", "notactive", Account.AccountStatus.CANCELED); |
|
|
|
|
|
|
|
|
|
|
|
account1.resetPassword("newpass"); |
|
|
|
|
|
account2.resetPassword("notgood"); |
|
|
|
|
|
|
|
|
|
|
|
assertEquals("newpass", account1.getPassword(),"Password successfully changed."); |
|
|
|
|
|
assertEquals("notactive", account2.getPassword(),"Activate your account to change your password"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |