@Test(expected = Database.IncompleteArgumentException.class) public void insertingElementWithEmptyDescriptionCausesDetailedException() throws Exception { mDatabase.insert(mTask); }
@Override public void insert(Task task) throws AlreadyStoredException, IncompleteArgumentException { if (task.uuid != null) throw new AlreadyStoredException(); require(task.description, Field.description); mTaskwarrior.put(task.description); }
TaskwarriorDatabase implements Database { @Override public void insert(Task task) throws AlreadyStoredException, IncompleteArgumentException { if (task.uuid != null) throw new AlreadyStoredException(); require(task.description, Field.description); mTaskwarrior.put(task.description); } }
TaskwarriorDatabase implements Database { @Override public void insert(Task task) throws AlreadyStoredException, IncompleteArgumentException { if (task.uuid != null) throw new AlreadyStoredException(); require(task.description, Field.description); mTaskwarrior.put(task.description); } TaskwarriorDatabase(Parser parser, Taskwarrior taskwarrior, Translator translator); }
TaskwarriorDatabase implements Database { @Override public void insert(Task task) throws AlreadyStoredException, IncompleteArgumentException { if (task.uuid != null) throw new AlreadyStoredException(); require(task.description, Field.description); mTaskwarrior.put(task.description); } 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 void insert(Task task) throws AlreadyStoredException, IncompleteArgumentException { if (task.uuid != null) throw new AlreadyStoredException(); require(task.description, Field.description); mTaskwarrior.put(task.description); } TaskwarriorDatabase(Parser parser, Taskwarrior taskwarrior, Translator translator); @Override Task[] select(); @Override void insert(Task task); @Override void update(Task task);  }