|
9 | 9 | import com.gooddata.GoodDataException; |
10 | 10 | import com.gooddata.gdc.UriResponse; |
11 | 11 | import com.gooddata.project.Project; |
12 | | -import org.hamcrest.Matchers; |
13 | 12 | import org.testng.annotations.BeforeMethod; |
14 | 13 | import org.testng.annotations.Test; |
15 | 14 |
|
16 | | -import static com.gooddata.JsonMatchers.serializesToJson; |
| 15 | +import java.util.Collection; |
| 16 | + |
17 | 17 | import static com.gooddata.connector.Status.Code.ERROR; |
18 | 18 | import static com.gooddata.connector.Status.Code.SYNCHRONIZED; |
19 | 19 | import static com.gooddata.util.ResourceUtils.*; |
20 | 20 | import static java.util.Collections.singletonMap; |
21 | 21 | import static net.jadler.Jadler.onRequest; |
22 | | -import static org.hamcrest.CoreMatchers.hasItem; |
23 | | -import static org.hamcrest.CoreMatchers.is; |
24 | | -import static org.hamcrest.CoreMatchers.notNullValue; |
| 22 | +import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; |
| 23 | +import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; |
| 24 | +import static org.hamcrest.CoreMatchers.*; |
25 | 25 | import static org.hamcrest.MatcherAssert.assertThat; |
26 | 26 | import static org.hamcrest.Matchers.emptyCollectionOf; |
27 | 27 |
|
28 | | -import java.util.Collection; |
29 | | - |
30 | 28 | public class ConnectorServiceIT extends AbstractGoodDataIT { |
31 | 29 | private Project project; |
32 | 30 | private ConnectorService connectors; |
@@ -206,7 +204,7 @@ public void shouldGetZendesk4Settings() throws Exception { |
206 | 204 | .withBody(readFromResource("/connector/settings-zendesk4.json")); |
207 | 205 |
|
208 | 206 | final Zendesk4Settings zendesk4Settings = connectors.getZendesk4Settings(project); |
209 | | - assertThat(zendesk4Settings, serializesToJson("/connector/settings-zendesk4.json")); |
| 207 | + assertThat(zendesk4Settings, jsonEquals(resource("connector/settings-zendesk4.json"))); |
210 | 208 | } |
211 | 209 |
|
212 | 210 | @Test(expectedExceptions = ConnectorException.class) |
@@ -238,7 +236,7 @@ public void shouldGetCoupaSettings() throws Exception { |
238 | 236 | .withBody(readFromResource("/connector/settings-coupa.json")); |
239 | 237 |
|
240 | 238 | final CoupaSettings coupaSettings = connectors.getCoupaSettings(project); |
241 | | - assertThat(coupaSettings, serializesToJson("/connector/settings-coupa.json")); |
| 239 | + assertThat(coupaSettings, jsonEquals(resource("connector/settings-coupa.json"))); |
242 | 240 | } |
243 | 241 |
|
244 | 242 | @Test |
@@ -336,6 +334,6 @@ public void shouldGetPardotSettings() throws Exception { |
336 | 334 | .withBody(readFromResource("/connector/settings-pardot.json")); |
337 | 335 |
|
338 | 336 | final PardotSettings pardotSettings = connectors.getPardotSettings(project); |
339 | | - assertThat(pardotSettings, serializesToJson("/connector/settings-pardot.json")); |
| 337 | + assertThat(pardotSettings, jsonEquals(resource("connector/settings-pardot.json"))); |
340 | 338 | } |
341 | 339 | } |
0 commit comments