use of org.apereo.cas.ticket.queue.DeleteTicketsMessageQueueCommand in project cas by apereo.
the class JmsTicketRegistry method deleteAll.
@Override
public long deleteAll() {
val result = super.deleteAll();
ticketPublisher.publishMessageToQueue(new DeleteTicketsMessageQueueCommand(id));
return result;
}
use of org.apereo.cas.ticket.queue.DeleteTicketsMessageQueueCommand in project cas by apereo.
the class DeleteTicketsMessageQueueCommandTests method verifyDeleteTickets.
@Test
public void verifyDeleteTickets() throws Exception {
val ticket = new TicketGrantingTicketImpl("TGT", CoreAuthenticationTestUtils.getAuthentication(), NeverExpiresExpirationPolicy.INSTANCE);
ticketRegistry.getObject().addTicket(ticket);
val cmd = new DeleteTicketsMessageQueueCommand(new PublisherIdentifier());
cmd.execute(ticketRegistry.getObject());
assertTrue(ticketRegistry.getObject().getTickets().isEmpty());
}
Aggregations