Created
March 13, 2019 06:59
-
-
Save raylax/e31ddd38a4d1ab1d50f4cd0b596fe7b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(SpringJUnit4ClassRunner.class) | |
@WebAppConfiguration | |
@ContextConfiguration(locations = {"classpath:applicationContext.xml","classpath:springmvc.xml"}) | |
public class MVCTest { | |
@Autowired | |
WebApplicationContext context; | |
MockMvc mockMvc; | |
@Before | |
public void initMokcMvc() { | |
mockMvc = MockMvcBuilders.webAppContextSetup(context).build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment