|
|
@@ -0,0 +1,48 @@
|
|
|
+package com.usoftchina.saas.inquiry.test;
|
|
|
+
|
|
|
+import com.usoftchina.saas.inquiry.api.EnConfigApi;
|
|
|
+import com.usoftchina.saas.inquiry.po.enConfig.AddOrUpdateEnterpriseRequest;
|
|
|
+import com.usoftchina.saas.inquiry.po.enConfig.RestGetEnterpriseListResponse;
|
|
|
+import com.usoftchina.saas.inquiry.po.enConfig.ResponseHeader;
|
|
|
+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;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Description 企业设置接口测试
|
|
|
+ * @Author chenwei
|
|
|
+ * @Date 2019/01/24
|
|
|
+ */
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
+@SpringBootTest
|
|
|
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
|
|
+public class EnConfigTest {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private EnConfigApi enConfigApi;
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void testA_addOrUpdateEnterprise(){
|
|
|
+ AddOrUpdateEnterpriseRequest addOrUpdateEnterpriseRequest = new AddOrUpdateEnterpriseRequest();
|
|
|
+ addOrUpdateEnterpriseRequest.setEnuu(10050748L);
|
|
|
+ addOrUpdateEnterpriseRequest.setName("李剑辉8");
|
|
|
+ addOrUpdateEnterpriseRequest.setSaas(true);
|
|
|
+ addOrUpdateEnterpriseRequest.setSaasPost(true);
|
|
|
+ addOrUpdateEnterpriseRequest.setAccessSecret("b0c0320f457149a0bac7d115a55d9f9f");
|
|
|
+ String responseHeader = enConfigApi.addOrUpdateEnterprise(addOrUpdateEnterpriseRequest);
|
|
|
+ System.out.println(JsonUtils.fromJsonString(responseHeader, ResponseHeader.class));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void testB_getEnterpriseList(){
|
|
|
+ String/*RestGetEnterpriseListResponse*/ response = enConfigApi.getEnterpriseList(10, 1, null);
|
|
|
+ RestGetEnterpriseListResponse getEnterpriseListResponse = JsonUtils.fromJsonString(response, RestGetEnterpriseListResponse.class);
|
|
|
+ System.out.println(JsonUtils.toJsonString(getEnterpriseListResponse));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|