Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ityouknow committed Nov 19, 2017
2 parents 2fdd4c9 + 9a63838 commit eb2bb38
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
package com.neo.helloWorld.web;

import com.neo.helloWorld.web.HelloWorldController;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;

Expand All @@ -26,7 +22,8 @@ public void setUp() throws Exception {

@Test
public void getHello() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.post("/hello?name=neo")).andDo(print());
mockMvc.perform(MockMvcRequestBuilders.post("/hello?name=小明")
.accept(MediaType.APPLICATION_JSON_UTF8)).andDo(print());
}

}

0 comments on commit eb2bb38

Please sign in to comment.