Made wepAppContex commont

This commit is contained in:
BuildTools
2020-10-30 16:53:41 +01:00
parent 4267fadf62
commit 1327a239e8
8 changed files with 17 additions and 37 deletions

@ -2,13 +2,11 @@ package com.plannaplan.controllers;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@ -16,14 +14,11 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@RunWith(SpringRunner.class)
@SpringBootTest
@ContextConfiguration
public class CoursesControllerTest {
public class CoursesControllerTest extends AbstractControllerTest {
private static final String COURSES_ENDPOINT = "/api/v1/courses/getCourses";
private static final String COURSESGROUPS_ENDPOINT = "/api/v1/courses/getCoursesWithGroups";
@Autowired
private WebApplicationContext webApplicationContext;
@Test
public void shouldReturnAllCoursesOk() throws Exception {