单元测试java
package com.yiautos.psf.order.service.impl; import com.yiautos.psf.order.service.OrderExpandService; import org.junit.Test; import com.yiautos.psf.PsfShopApplication; import lombok.extern.slf4j.Slf4j; import org.junit.runner.RunWith; import org.springblade.core.test.BladeBootTest; import org.springblade.core.test.BladeSpringRunner; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import javax.annotation.Resource; @RunWith(BladeSpringRunner.class) @SpringBootTest(classes = PsfShopApplication.class) @BladeBootTest(appName = "yiautos-psf-shop", enableLoader = true) @Slf4j public class OrderServiceImplTest { @Resource private OrderExpandService orderExpandService; @Test public void createQrImg() { } @Test public void testGiveCouponForOrder() { orderExpandService.customerOrderCompletedTotal("1455010505524641794"); } }