From b40acf8919115acf48f810dd4d6ba0ca809256a5 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Thu, 29 Oct 2020 17:45:15 +0100 Subject: [PATCH] Added tests to fill --- .../controllers/CommisionControllerTest.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/restservice/src/test/java/com/plannaplan/controllers/CommisionControllerTest.java b/restservice/src/test/java/com/plannaplan/controllers/CommisionControllerTest.java index bf371d7..7b3cf76 100755 --- a/restservice/src/test/java/com/plannaplan/controllers/CommisionControllerTest.java +++ b/restservice/src/test/java/com/plannaplan/controllers/CommisionControllerTest.java @@ -19,6 +19,7 @@ import com.plannaplan.entities.User; import com.plannaplan.services.UserService; import com.plannaplan.types.UserRoles; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.*; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; @@ -85,6 +86,36 @@ public class CommisionControllerTest { .andExpect(status().isOk()); } + @Test + public void shouldAddCommisionWithSelfIdPrivided() throws Exception { + assertTrue(false); + } + + @Test + public void shouldFailCommisionWithSomeoneIdPrividedAsStudent() throws Exception { + assertTrue(false); + } + + @Test + public void shouldFailCommisionAsDeanaryWithNoId() throws Exception { + assertTrue(false); + } + + @Test + public void shouldFailCommisionWithSelfIdPrividedAsDeanary() throws Exception { + assertTrue(false); + } + + @Test + public void shouldAddCommisionWithSomeoneIdPrividedAsDeanary() throws Exception { + assertTrue(false); + } + + @Test + public void shouldFailCommisionWithOtherDeanaryIdPrividedAsDeanary() throws Exception { + assertTrue(false); + } + private void checkUser() { if (CommisionControllerTest.user == null) { CommisionControllerTest.user = new User(null, null, TEST_COMMISIONS_EMAIL, UserRoles.TEST_USER);