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