Browse Source

Commit_47 Methode setPassword bearbeitet und wieder getestet

Mohamed
Adah Boukhari 5 years ago
parent
commit
338ecf4834
  1. BIN
      Budget Projekt/bin/MeinBudgetView/LoginFrame.class
  2. BIN
      Budget Projekt/bin/MeinBudgetView/MyTest.class
  3. 4
      Budget Projekt/src/MeinBudgetView/LoginFrame.java
  4. 17
      Budget Projekt/src/MeinBudgetView/MyTest.java

BIN
Budget Projekt/bin/MeinBudgetView/LoginFrame.class

BIN
Budget Projekt/bin/MeinBudgetView/MyTest.class

4
Budget Projekt/src/MeinBudgetView/LoginFrame.java

@ -101,8 +101,8 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener {
return benutzername; return benutzername;
} }
protected static void setPassword() {
passwordField.setText("admin");
protected static String setPassword(String password) {
return password;
} }
@Override @Override

17
Budget Projekt/src/MeinBudgetView/MyTest.java

@ -61,16 +61,19 @@ class MyTest {
} }
/**
@Test @Test
public void testSetPassword() { public void testSetPassword() {
String result = String.valueOf(LoginFrame.passwordField);
assertEquals(result, LoginFrame.setPassword());
assertNotEquals(result + " ", LoginFrame.setPassword());
assertNotEquals(null, LoginFrame.setPassword());
assertEquals("password", LoginFrame.setBenutzername("password"));
assertEquals("PassWord", LoginFrame.setBenutzername("PassWord"));
assertNotEquals("password", LoginFrame.setBenutzername(""));
assertNotEquals("PASSWORD", LoginFrame.setBenutzername("password"));
assertNotEquals("", LoginFrame.setBenutzername("password"));
assertEquals("PaSSwOrd".toUpperCase(), LoginFrame.setBenutzername("passwoRd").toUpperCase());
} }
*/
@Test @Test
public void testSetLeeren() { public void testSetLeeren() {

Loading…
Cancel
Save