单元测试
This commit is contained in:
@@ -0,0 +1,43 @@
|
|||||||
|
package com.chaozhanggui.system.cashierservice;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.poi.excel.ExcelUtil;
|
||||||
|
import cn.hutool.poi.excel.ExcelWriter;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.chaozhanggui.system.cashierservice.rabbit.PrintConsumer;
|
||||||
|
import com.chaozhanggui.system.cashierservice.rabbit.PrintMechineConsumer;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.ActiveProfiles;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ActiveProfiles("dev")
|
||||||
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||||
|
public class Tets {
|
||||||
|
@Autowired
|
||||||
|
private PrintMechineConsumer printMechineConsumer;
|
||||||
|
@Autowired
|
||||||
|
private PrintConsumer printConsumer;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test() {
|
||||||
|
// printMechineConsumer.listener("4537");
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("orderId", 4557);
|
||||||
|
jsonObject.put("orderDetailIds", new Integer[]{10454, 10455});
|
||||||
|
jsonObject.put("isReturn", false);
|
||||||
|
// printConsumer.printDishesListener(jsonObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user