|
@ -1,5 +1,6 @@ |
|
|
package MeinBudgetView; |
|
|
package MeinBudgetView; |
|
|
|
|
|
|
|
|
|
|
|
import static org.junit.Assert.assertEquals; |
|
|
import static org.junit.jupiter.api.Assertions.*; |
|
|
import static org.junit.jupiter.api.Assertions.*; |
|
|
|
|
|
|
|
|
import org.junit.jupiter.api.Test; |
|
|
import org.junit.jupiter.api.Test; |
|
@ -48,13 +49,19 @@ class MyTest { |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
public void testSetBenutzername() { |
|
|
public void testSetBenutzername() { |
|
|
String result = String.valueOf(LoginFrame.benutzername); |
|
|
|
|
|
assertEquals(result, LoginFrame.setBenutzername()); |
|
|
|
|
|
assertNotEquals(result + " ", LoginFrame.setBenutzername()); |
|
|
|
|
|
assertNotEquals(null, LoginFrame.setBenutzername()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals("admin", LoginFrame.setBenutzername("admin")); |
|
|
|
|
|
assertEquals("ADMIN", LoginFrame.setBenutzername("ADMIN")); |
|
|
|
|
|
assertNotEquals("Admin", LoginFrame.setBenutzername("")); |
|
|
|
|
|
assertNotEquals("admin", LoginFrame.setBenutzername("Admin")); |
|
|
|
|
|
assertNotEquals("", LoginFrame.setBenutzername("admin")); |
|
|
|
|
|
assertEquals("ADMin".toUpperCase(), LoginFrame.setBenutzername("admin").toUpperCase()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
@Test |
|
|
@Test |
|
|
public void testSetPassword() { |
|
|
public void testSetPassword() { |
|
|
String result = String.valueOf(LoginFrame.passwordField); |
|
|
String result = String.valueOf(LoginFrame.passwordField); |
|
@ -63,14 +70,14 @@ class MyTest { |
|
|
assertNotEquals(null, LoginFrame.setPassword()); |
|
|
assertNotEquals(null, LoginFrame.setPassword()); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
@Test |
|
|
@Test |
|
|
public void testSetLeeren() { |
|
|
public void testSetLeeren() { |
|
|
|
|
|
|
|
|
assertEquals("", LoginFrame.benutzernameLeeren()); |
|
|
|
|
|
assertNotEquals(" ", LoginFrame.benutzernameLeeren()); |
|
|
|
|
|
assertNotEquals("".length() > 0 , LoginFrame.benutzernameLeeren()); |
|
|
|
|
|
assertNotEquals(""==null, LoginFrame.benutzernameLeeren()); |
|
|
|
|
|
|
|
|
assertEquals("", LoginFrame.benutzernameUndPasswordLeeren()); |
|
|
|
|
|
assertNotEquals(" ", LoginFrame.benutzernameUndPasswordLeeren()); |
|
|
|
|
|
assertNotEquals("".length() > 0 , LoginFrame.benutzernameUndPasswordLeeren()); |
|
|
|
|
|
assertNotEquals(""==null, LoginFrame.benutzernameUndPasswordLeeren()); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|