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 695B

12345678910111213141516171819202122232425262728293031
  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("brunoklasing", "GEHEIM123");
  17. assertFalse(cred.valid());
  18. }
  19. @Test
  20. void validWrongData2() {
  21. Credentials cred = new Credentials("wimmerma", "GERONIMO");
  22. assertFalse(cred.valid());
  23. }
  24. }