@Test public void testPerformAction() throws Exception { context.checking(new Expectations() { { oneOf(mapper).refreshGadgetDefinitionUserCounts(); } }); sut.execute(new ActionContext() { private static final long serialVersionUID = 5336352843040807883L; @Override public Serializable getParams() { return null; } @Override public Map<String, Object> getState() { return null; } @Override public String getActionId() { return null; } @Override public void setActionId(final String inActionId) { } }); context.assertIsSatisfied(); }
@Override public Serializable execute(final ActionContext inActionContext) { Date start = new Date(); try { gadgetDefMapper.refreshGadgetDefinitionUserCounts(); } catch (Exception ex) { logger.error("Error occurred refreshing the Gadget Definition User Counts", ex); } Date end = new Date(); logger.info("Gadget Definition User Count Refresh Job: elapsed time: " + DurationFormatUtils.formatDurationHMS(end.getTime() - start.getTime())); return null; }
UpdateGadgetDefinitionCountExecution implements ExecutionStrategy<ActionContext> { @Override public Serializable execute(final ActionContext inActionContext) { Date start = new Date(); try { gadgetDefMapper.refreshGadgetDefinitionUserCounts(); } catch (Exception ex) { logger.error("Error occurred refreshing the Gadget Definition User Counts", ex); } Date end = new Date(); logger.info("Gadget Definition User Count Refresh Job: elapsed time: " + DurationFormatUtils.formatDurationHMS(end.getTime() - start.getTime())); return null; } }
UpdateGadgetDefinitionCountExecution implements ExecutionStrategy<ActionContext> { @Override public Serializable execute(final ActionContext inActionContext) { Date start = new Date(); try { gadgetDefMapper.refreshGadgetDefinitionUserCounts(); } catch (Exception ex) { logger.error("Error occurred refreshing the Gadget Definition User Counts", ex); } Date end = new Date(); logger.info("Gadget Definition User Count Refresh Job: elapsed time: " + DurationFormatUtils.formatDurationHMS(end.getTime() - start.getTime())); return null; } UpdateGadgetDefinitionCountExecution(final GadgetDefinitionMapper inGadgetDefMapper); }
UpdateGadgetDefinitionCountExecution implements ExecutionStrategy<ActionContext> { @Override public Serializable execute(final ActionContext inActionContext) { Date start = new Date(); try { gadgetDefMapper.refreshGadgetDefinitionUserCounts(); } catch (Exception ex) { logger.error("Error occurred refreshing the Gadget Definition User Counts", ex); } Date end = new Date(); logger.info("Gadget Definition User Count Refresh Job: elapsed time: " + DurationFormatUtils.formatDurationHMS(end.getTime() - start.getTime())); return null; } UpdateGadgetDefinitionCountExecution(final GadgetDefinitionMapper inGadgetDefMapper); @Override Serializable execute(final ActionContext inActionContext); }
UpdateGadgetDefinitionCountExecution implements ExecutionStrategy<ActionContext> { @Override public Serializable execute(final ActionContext inActionContext) { Date start = new Date(); try { gadgetDefMapper.refreshGadgetDefinitionUserCounts(); } catch (Exception ex) { logger.error("Error occurred refreshing the Gadget Definition User Counts", ex); } Date end = new Date(); logger.info("Gadget Definition User Count Refresh Job: elapsed time: " + DurationFormatUtils.formatDurationHMS(end.getTime() - start.getTime())); return null; } UpdateGadgetDefinitionCountExecution(final GadgetDefinitionMapper inGadgetDefMapper); @Override Serializable execute(final ActionContext inActionContext);  }