|
12345678910111213141516171819202122232425262728293031 |
- import org.junit.jupiter.api.Test;
-
- import static org.junit.jupiter.api.Assertions.*;
-
- class CredentialsTest {
-
- @Test
- void existingCheck() {
- Credentials cred = new Credentials("apple", "windows");
- assertNotNull(cred);
- }
-
- @Test
- void validData() {
- Credentials cred = new Credentials("hofmannol", "GERONIMO");
- assertTrue(cred.valid());
- }
-
- @Test
- void validWrongData() {
- Credentials cred = new Credentials("brunoklasing", "GEHEIM123");
- assertFalse(cred.valid());
- }
-
- @Test
- void validWrongData2() {
- Credentials cred = new Credentials("wimmerma", "GERONIMO");
- assertFalse(cred.valid());
- }
-
- }
|