|
|
@@ -0,0 +1,45 @@
|
|
|
+package com.usoftchina.inquiry.test;
|
|
|
+
|
|
|
+import com.usoftchina.inquiry.api.SearchApi;
|
|
|
+import com.usoftchina.inquiry.po.*;
|
|
|
+import com.usoftchina.inquiry.po.search.SearchComponentResp;
|
|
|
+import com.usoftchina.saas.utils.JsonUtils;
|
|
|
+import org.junit.FixMethodOrder;
|
|
|
+import org.junit.Test;
|
|
|
+import org.junit.runner.RunWith;
|
|
|
+import org.junit.runners.MethodSorters;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.boot.test.context.SpringBootTest;
|
|
|
+import org.springframework.test.context.junit4.SpringRunner;
|
|
|
+
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 询报价接口测试
|
|
|
+ * @Author chenwei
|
|
|
+ * @Date 2019/01/04
|
|
|
+ */
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
+@SpringBootTest
|
|
|
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
|
|
+public class SearchApiTest {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SearchApi searchApi;
|
|
|
+
|
|
|
+ private static final Long userUU = 1000002503L;
|
|
|
+ private static final Long enUU = 10041559L;
|
|
|
+ private static final int pageNum = 1;
|
|
|
+ private static final int pageSize = 5;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void testA_search(){
|
|
|
+ Map<String,Object> a = new HashMap<String,Object>();
|
|
|
+ a.put("PRICE","ASC");
|
|
|
+ SearchComponentResp result = searchApi.getInquiry("1",5,JsonUtils.toJsonString(a),"component",1,null);
|
|
|
+ System.out.println(JsonUtils.toJsonString(result));
|
|
|
+ }
|
|
|
+}
|