-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWebMvcTest.java
More file actions
36 lines (33 loc) · 1.02 KB
/
WebMvcTest.java
File metadata and controls
36 lines (33 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import com.tcloudata.controller.IndexController;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MockMvcBuilder;
import org.springframework.test.web.servlet.RequestBuilder;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
/**
* @ClassName
* @Description TODO
* @Author LiuYang
* @Date 2019/1/4/004 11:31
* @Version 1.0
**/
@RunWith(SpringRunner.class)
@SpringBootTest
@WebAppConfiguration
public class WebMvcTest {
private MockMvc mockMvc;
@Before
public void setUp(){
mockMvc= MockMvcBuilders.standaloneSetup(new IndexController()).build();
}
@Test
public void testIndexController(){
RequestBuilder request=null;
//request=request.buildRequest();
}
}