|
|
@@ -0,0 +1,47 @@
|
|
|
+package com.usoftchina.inquiry.test;
|
|
|
+
|
|
|
+import com.usoftchina.inquiry.api.SearchUUApi;
|
|
|
+import com.usoftchina.saas.utils.CollectionUtils;
|
|
|
+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 org.springframework.ui.ModelMap;
|
|
|
+
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Description 获取UU号测试
|
|
|
+ * @Author chenwei
|
|
|
+ * @Date 2019/01/09
|
|
|
+ */
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
+@SpringBootTest
|
|
|
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
|
|
+public class SearchUUApiTest {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SearchUUApi searchUUApi;
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void testA_queryEnterprises(){
|
|
|
+ String enterpriseName = "祝通鸿2";
|
|
|
+ Map<String, Map<String, Object>> resultMap = searchUUApi.queryEnterprises(enterpriseName);
|
|
|
+ if (CollectionUtils.isEmpty(resultMap)){
|
|
|
+ System.out.println("empty result!");
|
|
|
+ }
|
|
|
+ System.out.println(JsonUtils.toJsonString(resultMap));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void testB_queryEnterprise(){
|
|
|
+ String enterpriseName = "陈炜测试企业";
|
|
|
+ ModelMap modelMap = searchUUApi.queryEnterprise(enterpriseName, null, null);
|
|
|
+ System.out.println(JsonUtils.toJsonString(modelMap));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|