Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbae77b7

Browse files
author
Jesse Michael
committed
fix list accounts tests
1 parentd88c039 commitbae77b7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/test/java/com/brightcove/castlabs/client/CastlabsClientTest.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ public void testItCanHandleCastlabsErrorsWhileSettingFairplayConfiguration() thr
516516
publicvoidtestItCanMakeAListAccounts()throwsException {
517517
finalStringmerchantId ="merchX";
518518
finalHttpRequestexpectedRequest =
519-
request().withMethod("GET").withPath("frontend/rest/config/v1/" +merchantId +"/account/list")
519+
request().withMethod("GET").withPath("/frontend/rest/config/v1/" +merchantId +"/account/list")
520520
.withQueryStringParameter("ticket",exampleTicket);
521521
finalStringmockResponse =getTestResourceAsString("sample_list_account_response.json");
522522
mockServerClient.when(expectedRequest).respond(response().withStatusCode(200).withBody(mockResponse));
@@ -532,15 +532,15 @@ public void testItCanMakeAListAccounts() throws Exception {
532532
publicvoidtestItCanHandleCastlabsErrorsWhenMakingAListAccountsRequest()throwsException {
533533
finalStringmerchantId ="merchX";
534534
finalHttpRequestexpectedRequest =
535-
request().withMethod("GET").withPath("frontend/rest/config/v1/" +merchantId +"/account/list")
535+
request().withMethod("GET").withPath("/frontend/rest/config/v1/" +merchantId +"/account/list")
536536
.withQueryStringParameter("ticket",exampleTicket);
537537
mockServerClient.when(expectedRequest).respond(response().withStatusCode(403));
538538

539539
try {
540540
castlabsClient.listAccounts(merchantId);
541541
fail("Expected a CastlabsException to be returned");
542542
}catch(CastlabsExceptione) {
543-
assertThat(e.getMessage(),StringContains.containsString("Unexpected status code from Castlabs: 403"));
543+
assertEquals(e.getMessage(),"Empty response entity from Castlabs. HTTP Status: 403");
544544
mockServerClient.verify(expectedRequest,VerificationTimes.once());
545545
}
546546
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp