使用spring-boot-starter-test
進(jìn)行集成測試
<pre>
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(value = Application.class)
@WebIntegrationTest(value = {"spring.profiles.active=dev"})
</pre>
使用Mockito
進(jìn)行mocking
使用spring-boot-starter-test
進(jìn)行集成測試
<pre>
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(value = Application.class)
@WebIntegrationTest(value = {"spring.profiles.active=dev"})
</pre>
使用Mockito
進(jìn)行mocking