-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApiTest.java
More file actions
32 lines (24 loc) · 754 Bytes
/
ApiTest.java
File metadata and controls
32 lines (24 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.postman;
import com.postman.echo.ApiClient;
import feign.gson.GsonDecoder;
import feign.gson.GsonEncoder;
import feign.okhttp.OkHttpClient;
import org.junit.Before;
import org.junit.Test;
import static com.postman.echo.DogResponceAssert.assertThat;
import static feign.Feign.builder;
public class ApiTest {
private ApiClient apiClient;
@Before
public void setUp() {
apiClient = builder()
.client(new OkHttpClient())
.decoder(new GsonDecoder())
.encoder(new GsonEncoder())
.target(ApiClient.class, "https://dog.ceo");
}
@Test
public void test() {
assertThat(apiClient.getRandomImage()).hasNoNullFieldsOrPropertiesExcept();
}
}