REM:
1. 添加华为ATIC接口REST-ful请求测试用例
This commit is contained in:
HuangXin 2020-05-28 08:59:27 +08:00
parent 9f3d968c50
commit 096eea083b
1 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,29 @@
package com.dispose.test.huawei;
import com.dispose.common.Http;
import lombok.extern.slf4j.Slf4j;
import org.junit.Assert;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@Slf4j
@SpringBootTest
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class ATICInterfaceTestCase {
@Test
public void a1_authRequestTest() {
String jsonRequest = "{\"username\":\"test\",\"password\":\"BeiJing01@Lab3\"}";
String svrReturn = Http.postJson("https://106.38.75.154:43443/rest/openapi/ddos/auth",
null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn);
Assert.assertNotNull(svrReturn);
Assert.assertNotEquals(svrReturn.length(), 0);
}
}