@Test public void doesNotFailWhenNoExecutorsAreRegisteredForCommands() { cut = new CommandLogDispatcher(); cut.logLocalCommands(Arrays.asList(new PutToMap(), mock(ReplaceInList.class), mock(SetPropertyValue.class))); }
public void logLocalCommands(final List<Command> commands) { if (singleValue == null) { return; } for (final Command command : commands) { if (command instanceof SetPropertyValue) { singleValue.logLocalCommand((SetPropertyValue) command); } else if (command instanceof ListCommand) { lists.logLocalCommand((ListCommand) command); } } }
CommandLogDispatcher { public void logLocalCommands(final List<Command> commands) { if (singleValue == null) { return; } for (final Command command : commands) { if (command instanceof SetPropertyValue) { singleValue.logLocalCommand((SetPropertyValue) command); } else if (command instanceof ListCommand) { lists.logLocalCommand((ListCommand) command); } } } }
CommandLogDispatcher { public void logLocalCommands(final List<Command> commands) { if (singleValue == null) { return; } for (final Command command : commands) { if (command instanceof SetPropertyValue) { singleValue.logLocalCommand((SetPropertyValue) command); } else if (command instanceof ListCommand) { lists.logLocalCommand((ListCommand) command); } } } CommandLogDispatcher(final RepairingSingleValuePropertyCommandExecutor singleValue,
            final ReparingListPropertyCommandExecutor lists);  CommandLogDispatcher(); }
CommandLogDispatcher { public void logLocalCommands(final List<Command> commands) { if (singleValue == null) { return; } for (final Command command : commands) { if (command instanceof SetPropertyValue) { singleValue.logLocalCommand((SetPropertyValue) command); } else if (command instanceof ListCommand) { lists.logLocalCommand((ListCommand) command); } } } CommandLogDispatcher(final RepairingSingleValuePropertyCommandExecutor singleValue,
            final ReparingListPropertyCommandExecutor lists);  CommandLogDispatcher(); void logLocalCommands(final List<Command> commands); }
CommandLogDispatcher { public void logLocalCommands(final List<Command> commands) { if (singleValue == null) { return; } for (final Command command : commands) { if (command instanceof SetPropertyValue) { singleValue.logLocalCommand((SetPropertyValue) command); } else if (command instanceof ListCommand) { lists.logLocalCommand((ListCommand) command); } } } CommandLogDispatcher(final RepairingSingleValuePropertyCommandExecutor singleValue,
            final ReparingListPropertyCommandExecutor lists);  CommandLogDispatcher(); void logLocalCommands(final List<Command> commands);  }