putVar("todo", "toDoItem", notYetComplete.get(0));
}
@When("^mark the item as complete$")
public void mark_it_as_complete() throws Throwable {
final ToDoItem toDoItem = getVar(null, "toDoItem", ToDoItem.class);
if(supportsMocks()) {
final Bulk.InteractionContext bulkInteractionContext = service(Bulk.InteractionContext.class);
final EventBusService eventBusService = service(EventBusService.class);
checking(new Expectations() {
{
allowing(bulkInteractionContext);
allowing(eventBusService);
}
});
toDoItem.injectBulkInteractionContext(bulkInteractionContext);
toDoItem.injectEventBusService(eventBusService);
}
wrap(toDoItem).completed();
}