@RunWith(SpringRunner.class)
@SpringBootTest(classes = { DataRulesApplication.class })
@EnableAutoConfiguration
//@SpringBootTest(classes = { DataRulesApplication.class })
public class HuaboAddressTest extends AbstractTestNGSpringContextTests {
@Autowired
private HuaboAddressServiceImpl johnyService;
@Test
public void queryState() {
//johnyService.resetAllDistricts();
long startTime = System.currentTimeMillis();
// johnyService.resetAllDistricts();
// johnyService.batchUpdate2();
// johnyService.batchupdate3();
//johnyService.resetAllDistricts();
johnyService.updateBatch();
long endTime = System.currentTimeMillis();
System.out.println("執行時間:" + (endTime - startTime));
// long startTime = System.currentTimeMillis();
// johnyService.select1();
// long endTime = System.currentTimeMillis();
// System.err.println("執行時間1:"+(endTime-startTime));
// startTime = System.currentTimeMillis();
// johnyService.select2();
// endTime = System.currentTimeMillis();
// System.err.println("執行時間2:"+(endTime-startTime));
}
@Test
public void check() {
}
@Test
public void register() {
}
@Test
public void detail() {
}
@Test
public void queryCategory() {
}
}
其實只需要在setting中設置運行test的環境即可。