Search in sources :

Example 1 with Policy

use of org.folio.circulation.rules.Policy in project mod-circulation by folio-org.

the class CirculationRulesFixture method applyRulesForNoticePolicy.

public Policy applyRulesForNoticePolicy(ItemType itemType, LoanType loanType, PatronGroup patronGroup, ItemLocation location) {
    final Response response = applyRulesForPolicy(itemType, loanType, patronGroup, location, "/notice-policy", "apply-rules-to-get-notice-policy");
    String requestPolicyId = response.getJson().getString("noticePolicyId");
    assertThat(requestPolicyId, is(not(nullValue())));
    return new Policy(requestPolicyId);
}
Also used : Response(org.folio.circulation.support.http.client.Response) RestAssuredResponseConversion.toResponse(api.support.RestAssuredResponseConversion.toResponse) Policy(org.folio.circulation.rules.Policy)

Example 2 with Policy

use of org.folio.circulation.rules.Policy in project mod-circulation by folio-org.

the class CirculationRulesFixture method applyRulesForLoanPolicy.

public Policy applyRulesForLoanPolicy(ItemType itemType, LoanType loanType, PatronGroup patronGroup, ItemLocation location) {
    final Response response = applyRulesForPolicy(itemType, loanType, patronGroup, location, "/loan-policy", "apply-rules-to-get-loan-policy");
    String loanPolicyId = response.getJson().getString("loanPolicyId");
    assertThat(loanPolicyId, is(not(nullValue())));
    return new Policy(loanPolicyId);
}
Also used : Response(org.folio.circulation.support.http.client.Response) RestAssuredResponseConversion.toResponse(api.support.RestAssuredResponseConversion.toResponse) Policy(org.folio.circulation.rules.Policy)

Example 3 with Policy

use of org.folio.circulation.rules.Policy in project mod-circulation by folio-org.

the class CirculationRulesFixture method applyRulesForRequestPolicy.

public Policy applyRulesForRequestPolicy(ItemType itemType, LoanType loanType, PatronGroup patronGroup, ItemLocation location) {
    final Response response = applyRulesForPolicy(itemType, loanType, patronGroup, location, "/request-policy", "apply-rules-to-get-request-policy");
    String requestPolicyId = response.getJson().getString("requestPolicyId");
    assertThat(requestPolicyId, is(not(nullValue())));
    return new Policy(requestPolicyId);
}
Also used : Response(org.folio.circulation.support.http.client.Response) RestAssuredResponseConversion.toResponse(api.support.RestAssuredResponseConversion.toResponse) Policy(org.folio.circulation.rules.Policy)

Aggregations

RestAssuredResponseConversion.toResponse (api.support.RestAssuredResponseConversion.toResponse)3 Policy (org.folio.circulation.rules.Policy)3 Response (org.folio.circulation.support.http.client.Response)3