From c02c47efcb00782feb1461534923023a711d4f15 Mon Sep 17 00:00:00 2001 From: sowgro Date: Sun, 2 Mar 2025 11:22:48 -0500 Subject: First attempt at an authentication system. --- .../java/com/ufund/api/ufundapi/controller/UserControllerTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ufund-api/src/test/java/com/ufund/api/ufundapi/controller') diff --git a/ufund-api/src/test/java/com/ufund/api/ufundapi/controller/UserControllerTest.java b/ufund-api/src/test/java/com/ufund/api/ufundapi/controller/UserControllerTest.java index 681f47c..496c68c 100644 --- a/ufund-api/src/test/java/com/ufund/api/ufundapi/controller/UserControllerTest.java +++ b/ufund-api/src/test/java/com/ufund/api/ufundapi/controller/UserControllerTest.java @@ -84,7 +84,7 @@ public class UserControllerTest { User user = new User(username); // when createUser is called, return true simulating successful // creation and save - when(mockUserDAO.createUser(user)).thenReturn(user); + when(mockUserDAO.addUser(user)).thenReturn(user); // Invoke ResponseEntity response = userController.createUser(user); @@ -101,7 +101,7 @@ public class UserControllerTest { User user = new User(username); // when createUser is called, return false simulating failed // creation and save - when(mockUserDAO.createUser(user)).thenReturn(null); + when(mockUserDAO.addUser(user)).thenReturn(null); // Invoke ResponseEntity response = userController.createUser(user); @@ -117,7 +117,7 @@ public class UserControllerTest { User user = new User(username); // When createUser is called on the Mock User DAO, throw an IOException - doThrow(new IOException()).when(mockUserDAO).createUser(user); + doThrow(new IOException()).when(mockUserDAO).addUser(user); // Invoke ResponseEntity response = userController.createUser(user); -- cgit v1.2.3