File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed
user_profile_display_use_case Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1
- /**
1
+ package Profile_screen ; /**
2
2
* Provides the UI elements
3
3
*/
4
4
import javax .swing .*;
8
8
import java .io .File ;
9
9
10
10
11
- public class UserSearchUI implements UserPresenter {
11
+ public class UserSearchUI implements UserPresenter {
12
12
private JLabel label ;
13
13
14
14
public UserSearchUI () {
@@ -32,7 +32,7 @@ public void actionPerformed(ActionEvent e) {
32
32
frame .setVisible (true );
33
33
}
34
34
35
- // UserPresenter makes UI implement showProfile to invert the use-case --> UI dependency
35
+ // User_search_IA. UserPresenter makes UI implement showProfile to invert the use-case --> UI dependency
36
36
@ Override
37
37
public String showProfile (String username ) {
38
38
// setting up access to the database of users:
@@ -51,7 +51,7 @@ public String showProfile(String username) {
51
51
52
52
// for trying out the code:
53
53
// public static void main(String[] args) {
54
- // new UserSearchUI();
54
+ // new Profile_screen. UserSearchUI();
55
55
//
56
56
// }
57
57
Original file line number Diff line number Diff line change
1
+ package User_search_IA ;
2
+
1
3
// UI implements this interface to invert the dependency of UI on the inner layers
2
4
public interface UserPresenter {
3
5
String showProfile (String username );
Original file line number Diff line number Diff line change
1
+ package user_profile_display_use_case ;
2
+
1
3
import java .io .File ;
2
4
3
5
public class UserReader {
Original file line number Diff line number Diff line change
1
+ import Profile_screen .UserSearchUI ;
1
2
import org .junit .jupiter .api .Assertions ;
2
3
import org .junit .jupiter .api .Test ;
3
4
4
- import java .io .File ;
5
-
6
5
public class TestUserSearch {
7
6
@ Test
8
7
public void TestShowUser () {
You can’t perform that action at this time.
0 commit comments