@Test public void shouldLogBeforeUpdate() throws Exception { loggingUpdate.update("mah model", 1); assertThat( logger.beforeUpdate, contains(CapturingLogger.BeforeUpdateArgs.create("mah model", 1))); }
@Nonnull @Override public Next<M, F> update(M model, E event) { logger.beforeUpdate(model, event); Next<M, F> result = safeInvokeUpdate(model, event); logger.afterUpdate(model, event, result); return result; }
LoggingUpdate implements Update<M, E, F> { @Nonnull @Override public Next<M, F> update(M model, E event) { logger.beforeUpdate(model, event); Next<M, F> result = safeInvokeUpdate(model, event); logger.afterUpdate(model, event, result); return result; } }
LoggingUpdate implements Update<M, E, F> { @Nonnull @Override public Next<M, F> update(M model, E event) { logger.beforeUpdate(model, event); Next<M, F> result = safeInvokeUpdate(model, event); logger.afterUpdate(model, event, result); return result; } LoggingUpdate(Update<M, E, F> actualUpdate, MobiusLoop.Logger<M, E, F> logger); }
LoggingUpdate implements Update<M, E, F> { @Nonnull @Override public Next<M, F> update(M model, E event) { logger.beforeUpdate(model, event); Next<M, F> result = safeInvokeUpdate(model, event); logger.afterUpdate(model, event, result); return result; } LoggingUpdate(Update<M, E, F> actualUpdate, MobiusLoop.Logger<M, E, F> logger); @Nonnull @Override Next<M, F> update(M model, E event); }
LoggingUpdate implements Update<M, E, F> { @Nonnull @Override public Next<M, F> update(M model, E event) { logger.beforeUpdate(model, event); Next<M, F> result = safeInvokeUpdate(model, event); logger.afterUpdate(model, event, result); return result; } LoggingUpdate(Update<M, E, F> actualUpdate, MobiusLoop.Logger<M, E, F> logger); @Nonnull @Override Next<M, F> update(M model, E event);  }