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));
}
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));
}
Aggregations