springboot test方法



import com.lanfu.storehouse.MessageApplication;
import com.lanfu.storehouse.dao.mapper.PushMessageLogMapper;
import com.lanfu.storehouse.dto.req.wx.EntityVo;
import com.lanfu.storehouse.enums.InvoiceRecordTypeIntEnums;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.web.WebAppConfiguration;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = {MessageApplication.class})//需要的启动类
@WebAppConfiguration//web项目
public class Test001 {
@Autowired
private PushMessageLogMapper invoiceRecordMapper;

@Test
public void test000(){
EntityVo entityVo = new EntityVo("", "", InvoiceRecordTypeIntEnums.descOf(1), "蓝服控股", "1.00" + "元", "");
System.out.println("entityVo = " + entityVo);
}
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM