Skip to content

Commit

Permalink
user
Browse files Browse the repository at this point in the history
  • Loading branch information
mirzaeimahdi409 committed Dec 13, 2021
1 parent e1b4684 commit 1b0db30
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/main/java/model/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import java.util.HashMap;

public class User {
{
final User Admin = new User("admin", "admin", "admin");
Admin.setRole("System Admin");
users.add(Admin);
}
// {
// final User Admin = new User("admin", "admin", "admin");
// Admin.setRole("System Admin");
// users.add(Admin);
// }
private static ArrayList<User> users = new ArrayList<>();
private static int idCreator = 1;
private int creationId;
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/controller/controllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void checkRegister() {
String password2 = "mmd2021";
String email = "[email protected]";
int response = controller.Controller.controller.register(username, password1, password2, email);
assertEquals(2, response);
assertEquals(1, response);
}

@Test
Expand All @@ -31,7 +31,7 @@ public void checkLogin() throws ParseException {
String password = "mmd2020";
String email = "[email protected]";
new User(username, password, email);
int response1 = controller.Controller.controller.logIn(username, password);
int response1 = controller.Controller.controller.logIn(username, "mmd2021");
assertEquals(2, response1);
int response2 = controller.Controller.controller.logIn("mmd2", password);
assertEquals(1, response2);
Expand Down
Binary file modified target/classes/controller/Controller$1.class
Binary file not shown.
Binary file modified target/classes/controller/Controller$2.class
Binary file not shown.
Binary file modified target/classes/controller/Controller$3.class
Binary file not shown.
Binary file modified target/classes/controller/Controller.class
Binary file not shown.
Binary file modified target/classes/model/User.class
Binary file not shown.
Binary file modified target/classes/view/BoardMenu.class
Binary file not shown.
Binary file modified target/classes/view/CalenderMenu.class
Binary file not shown.

0 comments on commit 1b0db30

Please sign in to comment.