Skip to content

Commit 9e4bde1

Browse files
committed
fix junit usage
1 parent beb2d18 commit 9e4bde1

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
package cn.alapi.javasdk;
22

33
import 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

78
import 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+
}

0 commit comments

Comments
 (0)