ppp
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.

CredentialsTest.java 543B

12345678910111213141516171819202122232425
  1. import org.junit.jupiter.api.Test;
  2. import static org.junit.jupiter.api.Assertions.*;
  3. class CredentialsTest {
  4. @Test
  5. void existingCheck() {
  6. Credentials cred = new Credentials("apple", "windows");
  7. assertNotNull(cred);
  8. }
  9. @Test
  10. void validData() {
  11. Credentials cred = new Credentials("hofmannol", "GERONIMO");
  12. assertTrue(cred.valid());
  13. }
  14. @Test
  15. void validWrongData() {
  16. Credentials cred = new Credentials("hofmannol", "GEHEIM123");
  17. assertFalse(cred.valid());
  18. }
  19. }