From 5d087518e967dc3b6193e59a17f1440281daf26e Mon Sep 17 00:00:00 2001 From: Daniel Zdravkovic <3012893@stud.hs-mannheim.de> Date: Tue, 11 Jun 2024 10:57:28 +0200 Subject: [PATCH] get_all_user tests successful --- src/main/java/de/hs_mannheim/domain/System.java | 1 + src/main/resources/user_data.csv | 3 ++- src/test/java/de/hs_mannheim/domain/SystemTest.java | 8 +++----- src/test/resources/user_data.csv | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/hs_mannheim/domain/System.java b/src/main/java/de/hs_mannheim/domain/System.java index 69c2b4e..2a817b6 100644 --- a/src/main/java/de/hs_mannheim/domain/System.java +++ b/src/main/java/de/hs_mannheim/domain/System.java @@ -96,6 +96,7 @@ public class System { return false; } + /*public boolean sign_up_user(String username, String password, String hometown, String zipS, String car_name, String car_l_100kmS, String car_avg_kmhS, String bike_avg_kmhS) throws IOException { int zip = Integer.parseInt(zipS); diff --git a/src/main/resources/user_data.csv b/src/main/resources/user_data.csv index f55d378..b4eeae8 100644 --- a/src/main/resources/user_data.csv +++ b/src/main/resources/user_data.csv @@ -1 +1,2 @@ -Daniel;1401Daniel;Mannheim;68305;BMW;1.5;50.4;40.2 \ No newline at end of file +Daniel;1401Daniel;Mannheim;68305;BMW;1.5;50.4;40.2 +David;123Esel;Mannheim;68305;BMW;1.5;50.4;40.2 \ No newline at end of file diff --git a/src/test/java/de/hs_mannheim/domain/SystemTest.java b/src/test/java/de/hs_mannheim/domain/SystemTest.java index 05fbcdf..992760b 100644 --- a/src/test/java/de/hs_mannheim/domain/SystemTest.java +++ b/src/test/java/de/hs_mannheim/domain/SystemTest.java @@ -108,11 +108,9 @@ public class SystemTest { @Test public void get_all_user() { - assertEquals(1, current_system.get_all_user().size()); - - ArrayList list = new ArrayList<>(current_system.get_all_user()); - assertEquals(true, list.get(0).getPassword().equals("MTQwMURhbmllbA==")); - //Passwort unkodiert: 1401Daniel + assertEquals(2, current_system.get_all_user().size()); + assertEquals(true, current_system.get_all_user().get(0).getPassword().equals("MTQwMURhbmllbA==")); + assertEquals(true, current_system.get_all_user().get(1).getPassword().equals("MTIzRXNlbA==")); } } \ No newline at end of file diff --git a/src/test/resources/user_data.csv b/src/test/resources/user_data.csv index f55d378..b4eeae8 100644 --- a/src/test/resources/user_data.csv +++ b/src/test/resources/user_data.csv @@ -1 +1,2 @@ -Daniel;1401Daniel;Mannheim;68305;BMW;1.5;50.4;40.2 \ No newline at end of file +Daniel;1401Daniel;Mannheim;68305;BMW;1.5;50.4;40.2 +David;123Esel;Mannheim;68305;BMW;1.5;50.4;40.2 \ No newline at end of file