Skip to content

Commit 1ca065d

Browse files
committed
Fix test case
1 parent 5ad72be commit 1ca065d

3 files changed

Lines changed: 8 additions & 11 deletions

File tree

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
language: java
22

33
jdk:
4-
- openjdk8
5-
- openjdk12
4+
- openjdk14

src/test/java/com/ringcentral/DictionaryTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
import com.ringcentral.definitions.GetCountryInfoDictionaryResponse;
44
import com.ringcentral.definitions.GetCountryListResponse;
5+
import org.junit.Assert;
56
import org.junit.Test;
67

78
import java.io.IOException;
89

9-
import static org.junit.Assert.assertTrue;
10-
1110
public class DictionaryTest {
1211
@Test
1312
public void testGetCountry() throws IOException, RestException {
@@ -24,7 +23,7 @@ public void testGetCountry() throws IOException, RestException {
2423
);
2524

2625
GetCountryInfoDictionaryResponse c = rc.restapi().dictionary().country("46").get();
27-
assertEquals("China", c.name);
26+
Assert.assertEquals("China", c.name);
2827

2928
rc.revoke();
3029
}
@@ -44,7 +43,7 @@ public void testListCountry() throws IOException, RestException {
4443
);
4544

4645
GetCountryListResponse r = rc.restapi().dictionary().country().list();
47-
assertTrue(r.records.length > 0);
46+
Assert.assertTrue(r.records.length > 0);
4847

4948
rc.revoke();
5049
}

src/test/java/com/ringcentral/IVRContentTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
import com.ringcentral.definitions.PromptInfo;
77
import okhttp3.Request;
88
import okhttp3.Response;
9+
import org.junit.Assert;
910
import org.junit.Test;
1011

1112
import java.io.IOException;
1213
import java.nio.file.Files;
1314
import java.nio.file.Paths;
1415

15-
import static org.junit.Assert.assertNotNull;
16-
1716
public class IVRContentTest {
1817
@Test
1918
public void downloadIVRPromptContent() throws IOException, RestException {
@@ -31,8 +30,8 @@ public void downloadIVRPromptContent() throws IOException, RestException {
3130

3231
IVRPrompts ivrPrompts = rc.restapi().account().ivrprompts().list();
3332
PromptInfo promptInfo = rc.restapi().account().ivrprompts(ivrPrompts.records[0].id).get();
34-
assertNotNull(promptInfo.id);
35-
assertEquals(promptInfo.id, ivrPrompts.records[0].id);
33+
Assert.assertNotNull(promptInfo.id);
34+
Assert.assertEquals(promptInfo.id, ivrPrompts.records[0].id);
3635

3736
// ResponseBody responseBody = rc.get("/restapi/v1.0/account/~/ivr-prompts/"+ promptInfo.id + "/content");
3837
// byte[] bytes = responseBody.bytes();
@@ -95,7 +94,7 @@ public void afterHttpCall(Response response, Request request) {
9594

9695
IVRPrompts ivrPrompts = rc.restapi().account().ivrprompts().list();
9796
PromptInfo promptInfo = rc.restapi().account().ivrprompts(ivrPrompts.records[0].id).get();
98-
assertNotNull(promptInfo.id);
97+
Assert.assertNotNull(promptInfo.id);
9998

10099
// PromptInfo promptInfo = rc.restapi().account().ivrprompts().put(new CreateIvrPromptRequest()
101100
// .name("Uploaded via API")

0 commit comments

Comments
 (0)