Search in sources :

Example 1 with EndSessionBuilder

use of api.support.builders.EndSessionBuilder in project mod-circulation by folio-org.

the class EndExpiredPatronActionSessionTests method noExpiredEndSessionAfterCheckIn.

@Test
void noExpiredEndSessionAfterCheckIn() {
    IndividualResource james = usersFixture.james();
    ItemResource nod = itemsFixture.basedUponNod();
    ItemResource interestingTimes = itemsFixture.basedUponInterestingTimes();
    checkOutFixture.checkOutByBarcode(nod, james);
    checkOutFixture.checkOutByBarcode(interestingTimes, james);
    checkInFixture.checkInByBarcode(nod);
    checkInFixture.checkInByBarcode(interestingTimes);
    expiredEndSessionClient.deleteAll();
    List<JsonObject> sessions = patronSessionRecordsClient.getAll();
    assertThat(sessions, hasSize(4));
    expiredEndSessionClient.create(new EndSessionBuilder());
    expiredSessionProcessingClient.runRequestExpiredSessionsProcessing(204);
    waitAtMost(1, SECONDS).until(patronSessionRecordsClient::getAll, hasSize(4));
}
Also used : EndSessionBuilder(api.support.builders.EndSessionBuilder) JsonObject(io.vertx.core.json.JsonObject) IndividualResource(api.support.http.IndividualResource) ItemResource(api.support.http.ItemResource) Test(org.junit.jupiter.api.Test)

Example 2 with EndSessionBuilder

use of api.support.builders.EndSessionBuilder in project mod-circulation by folio-org.

the class EndExpiredPatronActionSessionTests method noExpiredEndSessionAfterCheckOut.

@Test
void noExpiredEndSessionAfterCheckOut() {
    IndividualResource james = usersFixture.james();
    checkOutFixture.checkOutByBarcode(itemsFixture.basedUponNod(), james);
    checkOutFixture.checkOutByBarcode(itemsFixture.basedUponInterestingTimes(), james);
    expiredEndSessionClient.deleteAll();
    List<JsonObject> sessions = patronSessionRecordsClient.getAll();
    assertThat(sessions, hasSize(2));
    expiredEndSessionClient.create(new EndSessionBuilder());
    expiredSessionProcessingClient.runRequestExpiredSessionsProcessing(204);
    waitAtMost(1, SECONDS).until(patronSessionRecordsClient::getAll, hasSize(2));
}
Also used : EndSessionBuilder(api.support.builders.EndSessionBuilder) JsonObject(io.vertx.core.json.JsonObject) IndividualResource(api.support.http.IndividualResource) Test(org.junit.jupiter.api.Test)

Aggregations

EndSessionBuilder (api.support.builders.EndSessionBuilder)2 IndividualResource (api.support.http.IndividualResource)2 JsonObject (io.vertx.core.json.JsonObject)2 Test (org.junit.jupiter.api.Test)2 ItemResource (api.support.http.ItemResource)1