@Test(expected = IllegalArgumentException.class) public void testWrongArguments() { DatasetItemDeletionHandler handler = getDatasetItemDeletionHandler(); handler.parseAndVerifyArguments(Collections.singletonList(DATASET_NAME), new ApplicationOptions()); }
@Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (arguments.size() < 2) { throw new IllegalArgumentException(MessageConstants.getMessage(MINIMUM_COMMAND_ARGUMENTS, getCommand(), 2, arguments.size())); } datasetId = parseProjectId(arguments.get(0)); for (int i = 1; i < arguments.size(); i++) { items.add(parseFileId(arguments.get(i))); } this.printTable = options.isPrintTable(); this.printJson = options.isPrintJson(); }
DatasetItemDeletionHandler extends AbstractHTTPCommandHandler { @Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (arguments.size() < 2) { throw new IllegalArgumentException(MessageConstants.getMessage(MINIMUM_COMMAND_ARGUMENTS, getCommand(), 2, arguments.size())); } datasetId = parseProjectId(arguments.get(0)); for (int i = 1; i < arguments.size(); i++) { items.add(parseFileId(arguments.get(i))); } this.printTable = options.isPrintTable(); this.printJson = options.isPrintJson(); } }
DatasetItemDeletionHandler extends AbstractHTTPCommandHandler { @Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (arguments.size() < 2) { throw new IllegalArgumentException(MessageConstants.getMessage(MINIMUM_COMMAND_ARGUMENTS, getCommand(), 2, arguments.size())); } datasetId = parseProjectId(arguments.get(0)); for (int i = 1; i < arguments.size(); i++) { items.add(parseFileId(arguments.get(i))); } this.printTable = options.isPrintTable(); this.printJson = options.isPrintJson(); }  }
DatasetItemDeletionHandler extends AbstractHTTPCommandHandler { @Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (arguments.size() < 2) { throw new IllegalArgumentException(MessageConstants.getMessage(MINIMUM_COMMAND_ARGUMENTS, getCommand(), 2, arguments.size())); } datasetId = parseProjectId(arguments.get(0)); for (int i = 1; i < arguments.size(); i++) { items.add(parseFileId(arguments.get(i))); } this.printTable = options.isPrintTable(); this.printJson = options.isPrintJson(); }  @Override void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options); @Override int runCommand(); }
DatasetItemDeletionHandler extends AbstractHTTPCommandHandler { @Override public void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options) { if (arguments.size() < 2) { throw new IllegalArgumentException(MessageConstants.getMessage(MINIMUM_COMMAND_ARGUMENTS, getCommand(), 2, arguments.size())); } datasetId = parseProjectId(arguments.get(0)); for (int i = 1; i < arguments.size(); i++) { items.add(parseFileId(arguments.get(i))); } this.printTable = options.isPrintTable(); this.printJson = options.isPrintJson(); }  @Override void parseAndVerifyArguments(List<String> arguments, ApplicationOptions options); @Override int runCommand();  }