Skip to content

Commit c1cdf33

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents e94bc4d + ebbfd94 commit c1cdf33

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SOLID Chat
22

3-
## Our Progress (Last Updated on Nov 20)
3+
## Our Progress (Last Updated on Nov 21)
44

55
Each of us have created one or more PRs and most of these have been merged into the main branch. Many members have functional UI's (and they are likely happy to demonstrate in tutorial) and others have a basic non-interactive UI and the inner layers of clean architecture. While they may not be able to do an interactive demo, screenshots of these user interfaces are included below.
66

@@ -11,6 +11,9 @@ Each of us have created one or more PRs and most of these have been merged into
1111

1212
![image](https://user-images.githubusercontent.com/18428059/202935072-ba09587d-c67d-4599-9986-9c652480356f.png)
1313

14+
- Update on inner layers of the conversation history feature:
15+
- The ConvHistInteractor, responsible for displaying a conversation history, was tested (see [here](https://github.com/CSC207-2022F-UofT/course-project-SOLID-chat/pull/32)). To focus testing on the interactor, a mock data access class was used. While the test does not currently pass, the structure of the test is there.
16+
1417
### Profile display
1518
- By Parmis
1619
- Implemented by UserSearchUI, which allows a user to type in a user's username to view their features (user and username so far).

src/main/java/entities/user_entities/User.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
package entities.user_entities;
22

3+
import data_access.UserDatabase;
34
import entities.chat.Chat;
45
import interface_adapters.profile_modification_IA.UserAuthenticationI;
56
import interface_adapters.login_interface_adapters.Login;
67
import use_cases.user_attribute_modification_use_case.Changeable;
78
import interface_adapters.app_screen_interface_adapters.UserAppScreenGateway;
89
import entities.chat.*;
910

11+
import java.io.File;
1012
import java.io.Serializable;
1113
import java.util.ArrayList;
1214

@@ -55,7 +57,7 @@ public Boolean PasswordMatch(String attempt){
5557
}
5658

5759
public void login(){
58-
UserAppScreenGateway appScreenGateway = new UserAppScreenGateway(this.getUsername());
60+
UserAppScreenGateway appScreenGateway = new UserAppScreenGateway(this.getUsername(), new UserDatabase(new File("test9")));
5961
}
6062

6163
public ArrayList<Chat> getChats() {

src/main/java/interface_adapters/app_screen_interface_adapters/UserAppScreenGateway.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ public class UserAppScreenGateway implements Login {
1414
/**
1515
* Create gateway between user and appscreen
1616
*/
17-
public UserAppScreenGateway(String username){
17+
public UserAppScreenGateway(String username, UserDatabase userDatabase){
1818
this.username = username;
19-
this.userDatabase = new UserDatabase();
19+
this.userDatabase = userDatabase;
2020
login();
2121
}
2222

src/main/java/interface_adapters/login_interface_adapters/UserLoginController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public void allowLogin(){
2121
try{
2222
boolean allowLogin = user.PasswordMatch(this.password);
2323
if(allowLogin){
24+
System.out.println("made it here");
2425
user.login();
2526
}else{
2627
accessDenied("Wrong Password");

src/main/java/screens/login_screen/UserLoginUI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void getLoginCredentials(){
4747
JButton loginButton = new JButton("login");
4848
loginButton.setBounds(210, 95, 100, 25);
4949
loginPanel.add(loginButton);
50-
loginButton.addActionListener(this);
50+
loginButton.addActionListener(this::actionPerformed);
5151
loginFrame.setVisible(true);
5252

5353
}

src/main/java/screens/user_registration_screen/UserRegistrationUI.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public static void main(String[] args){
102102
UserDatabase testDB = new UserDatabase(new File("Test9"));
103103
System.out.println(testDB.UserExists("RandomUser", "[email protected]"));
104104
System.out.println(testDB.getList().size());
105+
System.out.println(testDB.getList().get(0).getUsername());
105106
UserRegistrationUI testUI = new UserRegistrationUI(testDB);
106107

107108
testUI.GetUserCredentials();

0 commit comments

Comments
 (0)