File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
src/test/java/cn/alapi/javasdk Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 11package cn .alapi .javasdk ;
22
33import org .json .simple .parser .ParseException ;
4- import org .junit .Test ;
5- import org .junit .Assert ;
4+
5+ import org .junit .jupiter .api .DisplayName ;
6+ import org .junit .jupiter .api .Test ;
67
78import java .io .IOException ;
89
10+ import static org .junit .jupiter .api .Assertions .*;
11+
912/**
1013 * @author yeliulee
11- * Created at 2021/6/22 21:29
14+ * Created at 2021/6/22 22:27
1215 */
13- public class AlapiClientTest {
16+ @ DisplayName ("ALAPI 请求客户端测试" )
17+ class AlapiClientTest {
1418
1519 /**
16- * test for empty token
20+ * 空 token 测试
1721 */
1822 @ Test
1923 public void testForEmptyToken () throws IOException , ParseException {
2024 AlapiClient client = new AlapiClient ().setToken ("" );
2125 AlapiRequest request = new AlapiRequest ();
2226 request .setApi ("/api/joke/random" );
2327 AlapiResponse response = client .execute (request );
24- Assert .assertEquals (101L , response .getCode ());
28+ System .out .println (response .getMsg ());
29+ assertEquals (101L , response .getCode ());
2530 }
26- }
31+ }
You can’t perform that action at this time.
0 commit comments