@Before public void setUp() throws Exception { initMocks(this); config = ConfigsUtils.prepareConfigOne(); when(configService.getByName(config.getName())).thenReturn(config); appSchemaChangeController = new AppSchemaChangeController(eventRelay, configService); controller = MockMvcBuilders.standaloneSetup(appSchemaChangeController).build(); }
@Before public void runBeforeTestMethod() { System.out.println("Before test method"); String contextLoc = "classpath:appContext.xml"; String warDir = "src/main/webapp"; mockMvc = MockMvcBuilders.xmlConfigSetup("classpath:/WEB-INF/spring/appServlet/servlet-context.xml") .configureWebAppRootDir(warDir, false) .build(); }
@Before public void setUp() throws Exception { mockMvc = MockMvcBuilders.standaloneSetup(controller).build(); }
@Before public void setUp() throws Exception { initMocks(this); controller = MockMvcBuilders.standaloneSetup(enrollmentController).build(); }
@Before public void setUp() { mockMvc = MockMvcBuilders.webApplicationContextSetup(webApplicationContext).build(); }
@Before public void setup() { MockitoAnnotations.initMocks(this); mockMvc = MockMvcBuilders.standaloneSetup(this.imageController).build(); }