2016-10-04 08:32:33 +08:00
|
|
|
package sample.testnomockito;
|
|
|
|
|
|
|
|
|
|
import org.junit.Test;
|
|
|
|
|
import org.junit.runner.RunWith;
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.context.ApplicationContext;
|
|
|
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
|
|
|
|
|
|
/**
|
2016-11-16 21:26:39 +08:00
|
|
|
* Tests that {@code ResetMocksTestExecutionListener} and
|
2016-10-04 08:32:33 +08:00
|
|
|
* {@code MockitoTestExecutionListener} gracefully degrade when Mockito is not on the
|
|
|
|
|
* classpath.
|
|
|
|
|
*
|
|
|
|
|
* @author Madhura Bhave
|
|
|
|
|
*/
|
|
|
|
|
@RunWith(SpringRunner.class)
|
|
|
|
|
public class SampleTestNoMockitoApplicationTest {
|
|
|
|
|
|
|
|
|
|
// gh-7065
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ApplicationContext context;
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void contextLoads() throws Exception {
|
|
|
|
|
assertThat(this.context).isNotNull();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|