|
7 | 7 | public class UserDatabaseTest {
|
8 | 8 | @Test
|
9 | 9 | public void addingFilesRightEmailAndUser(){
|
10 |
| - File accounts = new File("Test"); |
| 10 | + File accounts = new File("Test3"); |
11 | 11 | UserDatabase accountDatabase = new UserDatabase(accounts);
|
12 | 12 | accountDatabase. createUser( "MadhavGopakumar", "123", "[email protected]", "Basic");
|
13 | 13 | Assertions. assertTrue( accountDatabase. UserExists( "MadhavGopakumar", "[email protected]"));
|
14 | 14 | }
|
15 | 15 | @Test
|
16 | 16 | public void addingMultipleFiles(){
|
17 |
| - File accounts = new File("Test"); |
| 17 | + File accounts = new File("Test3"); |
18 | 18 | UserDatabase accountDatabase = new UserDatabase(accounts);
|
19 | 19 | accountDatabase. createUser( "MeenakshiGopakumar", "123", "[email protected]", "Basic");
|
20 | 20 | Assertions. assertTrue( accountDatabase. UserExists( "MeenakshiGopakumar", "[email protected]"));
|
21 | 21 | }
|
22 | 22 | @Test
|
23 | 23 | public void rightEmailWrongUser(){
|
24 |
| - File accounts = new File("Test"); |
| 24 | + File accounts = new File("Test3"); |
25 | 25 | UserDatabase accountDatabase = new UserDatabase(accounts);
|
26 | 26 | accountDatabase. createUser( "MadhavGopakumar", "123", "[email protected]", "Basic");
|
27 | 27 | Assertions. assertTrue( accountDatabase. UserExists( "MadG", "[email protected]"));
|
28 | 28 | }
|
29 | 29 | @Test
|
30 | 30 | public void rightUserWrongEmail(){
|
31 |
| - File accounts = new File("Test"); |
| 31 | + File accounts = new File("Test3"); |
32 | 32 | UserDatabase accountDatabase = new UserDatabase(accounts);
|
33 | 33 | Assertions.assertTrue(accountDatabase.UserExists("MeenakshiGopakumar", "ma"));
|
34 | 34 | }
|
35 | 35 | @Test
|
36 | 36 | public void listedUsers(){
|
37 |
| - File accounts = new File("Test"); |
| 37 | + File accounts = new File("Test3"); |
38 | 38 | UserDatabase accountDatabase = new UserDatabase(accounts);
|
39 | 39 | accountDatabase. createUser( "MeenakshiGopakumar", "123", "[email protected]", "Basic");
|
40 | 40 | List<User> lst = accountDatabase.getList();
|
41 | 41 | String email = lst.get(0).getEmail();
|
| 42 | + System.out.println(email); |
42 | 43 | Assertions. assertTrue( email. equals( "[email protected]"));
|
43 | 44 | }
|
44 | 45 |
|
45 | 46 | @Test
|
46 | 47 | public void userGot() {
|
47 |
| - File accounts = new File("Test"); |
| 48 | + File accounts = new File("Test3"); |
48 | 49 | UserDatabase accountDatabase = new UserDatabase(accounts);
|
49 | 50 | accountDatabase. createUser( "MeenakshiGopakumar", "123", "[email protected]", "Basic");
|
50 | 51 | User user = accountDatabase.getUser("MeenakshiGopakumar");
|
|
0 commit comments