aboutsummaryrefslogtreecommitdiff
path: root/ufund-api/src/test/java/com/ufund/api/ufundapi/service/UserServiceTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'ufund-api/src/test/java/com/ufund/api/ufundapi/service/UserServiceTest.java')
-rw-r--r--ufund-api/src/test/java/com/ufund/api/ufundapi/service/UserServiceTest.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/ufund-api/src/test/java/com/ufund/api/ufundapi/service/UserServiceTest.java b/ufund-api/src/test/java/com/ufund/api/ufundapi/service/UserServiceTest.java
index 6234416..74f5c63 100644
--- a/ufund-api/src/test/java/com/ufund/api/ufundapi/service/UserServiceTest.java
+++ b/ufund-api/src/test/java/com/ufund/api/ufundapi/service/UserServiceTest.java
@@ -16,21 +16,21 @@ import com.ufund.api.ufundapi.DuplicateKeyException;
import com.ufund.api.ufundapi.model.User;
import com.ufund.api.ufundapi.persistence.UserDAO;
-public class UserServiceTest {
+class UserServiceTest {
private UserService userService;
private UserDAO mockUserDAO;
@BeforeEach
- public void setupUserService() {
+ void setupUserService() {
mockUserDAO = mock(UserDAO.class);
CupboardService mockCupboardService = mock(CupboardService.class);
userService = new UserService(mockUserDAO, mockCupboardService);
}
@Test
- public void testCreateUser() throws IOException, DuplicateKeyException {
+ void testCreateUser() throws IOException, DuplicateKeyException {
// Setup
String username = "Jelly";
String password = "Fish";
@@ -47,7 +47,7 @@ public class UserServiceTest {
}
@Test
- public void testCreateUserDuplicate() throws IOException {
+ void testCreateUserDuplicate() throws IOException {
// Setup
String username = "Jelly";
String password = "Fish";
@@ -62,7 +62,7 @@ public class UserServiceTest {
}
@Test
- public void testGetUser() throws IOException {
+ void testGetUser() throws IOException {
// Setup
String username = "Jelly";
String password = "Fish";
@@ -76,7 +76,7 @@ public class UserServiceTest {
}
@Test
- public void testGetUserBlank() throws IOException {
+ void testGetUserBlank() throws IOException {
// Setup
String username = "Jelly";
String password = "Fish";
@@ -89,7 +89,7 @@ public class UserServiceTest {
assertNull(userService.getUser(username));
}
- @Test public void testGetUserCount() throws IOException {
+ @Test void testGetUserCount() throws IOException {
// Setup
String username = "Jelly";
String password = "Fish";
@@ -105,12 +105,12 @@ public class UserServiceTest {
int userCount = userService.getUserCount();
// Analyze
- assertEquals(userCount, 1);
+ assertEquals(1, userCount);
}
@Test
- public void testUpdateUser() throws IOException {
+ void testUpdateUser() throws IOException {
// Setup
String username = "Jelly";
String password = "Fish";
@@ -128,7 +128,7 @@ public class UserServiceTest {
}
@Test
- public void testUpdateUserDifferentUsernames() throws IOException {
+ void testUpdateUserDifferentUsernames() throws IOException {
// Setup
String username = "Jelly";
String password = "Fish";
@@ -146,7 +146,7 @@ public class UserServiceTest {
}
@Test
- public void testDeleteUser() throws IOException {
+ void testDeleteUser() throws IOException {
// Setup
String username = "Jelly";
String password = "Fish";