@Test public void selectsTasks() throws Exception { final int tasksCount = 3; configure(tasksCount, internalTask(InternalTask.Status.Pending), mTask); assertEquals(tasksCount, mDatabase.select().length); }
@Override public Task[] select() { Taskwarrior.Output output = mTaskwarrior.export(); List<InternalTask> internalTasks = only(parse(output.stdout), InternalTask.Status.Pending); return translateAll(internalTasks); }
TaskwarriorDatabase implements Database { @Override public Task[] select() { Taskwarrior.Output output = mTaskwarrior.export(); List<InternalTask> internalTasks = only(parse(output.stdout), InternalTask.Status.Pending); return translateAll(internalTasks); } }
TaskwarriorDatabase implements Database { @Override public Task[] select() { Taskwarrior.Output output = mTaskwarrior.export(); List<InternalTask> internalTasks = only(parse(output.stdout), InternalTask.Status.Pending); return translateAll(internalTasks); } TaskwarriorDatabase(Parser parser, Taskwarrior taskwarrior, Translator translator); }
TaskwarriorDatabase implements Database { @Override public Task[] select() { Taskwarrior.Output output = mTaskwarrior.export(); List<InternalTask> internalTasks = only(parse(output.stdout), InternalTask.Status.Pending); return translateAll(internalTasks); } TaskwarriorDatabase(Parser parser, Taskwarrior taskwarrior, Translator translator); @Override Task[] select(); @Override void insert(Task task); @Override void update(Task task); }
TaskwarriorDatabase implements Database { @Override public Task[] select() { Taskwarrior.Output output = mTaskwarrior.export(); List<InternalTask> internalTasks = only(parse(output.stdout), InternalTask.Status.Pending); return translateAll(internalTasks); } TaskwarriorDatabase(Parser parser, Taskwarrior taskwarrior, Translator translator); @Override Task[] select(); @Override void insert(Task task); @Override void update(Task task);  }