Added tests to fill

This commit is contained in:
BuildTools 2020-10-29 17:45:15 +01:00
parent ed00731654
commit b40acf8919

View File

@ -19,6 +19,7 @@ import com.plannaplan.entities.User;
import com.plannaplan.services.UserService; import com.plannaplan.services.UserService;
import com.plannaplan.types.UserRoles; 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.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.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
@ -85,6 +86,36 @@ public class CommisionControllerTest {
.andExpect(status().isOk()); .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() { private void checkUser() {
if (CommisionControllerTest.user == null) { if (CommisionControllerTest.user == null) {
CommisionControllerTest.user = new User(null, null, TEST_COMMISIONS_EMAIL, UserRoles.TEST_USER); CommisionControllerTest.user = new User(null, null, TEST_COMMISIONS_EMAIL, UserRoles.TEST_USER);