@Test public void toStringTest() { String key = "-c"; String value = "test"; DSpaceCommandLineParameter dSpaceCommandLineParameter = new DSpaceCommandLineParameter(key, value); assertThat("toStringTest 0", dSpaceCommandLineParameter.getName(), equalTo(key)); assertThat("toStringTest 1", dSpaceCommandLineParameter.getValue(), equalTo(value)); assertThat("toStringTest 2", dSpaceCommandLineParameter.toString(), equalTo("-c test")); }
public String toString() { String stringToReturn = ""; stringToReturn += getName(); if (StringUtils.isNotBlank(getValue())) { stringToReturn += " "; stringToReturn += getValue(); } return stringToReturn; }
DSpaceCommandLineParameter { public String toString() { String stringToReturn = ""; stringToReturn += getName(); if (StringUtils.isNotBlank(getValue())) { stringToReturn += " "; stringToReturn += getValue(); } return stringToReturn; } }
DSpaceCommandLineParameter { public String toString() { String stringToReturn = ""; stringToReturn += getName(); if (StringUtils.isNotBlank(getValue())) { stringToReturn += " "; stringToReturn += getValue(); } return stringToReturn; } DSpaceCommandLineParameter(String key, String value); protected  DSpaceCommandLineParameter(String parameter); }
DSpaceCommandLineParameter { public String toString() { String stringToReturn = ""; stringToReturn += getName(); if (StringUtils.isNotBlank(getValue())) { stringToReturn += " "; stringToReturn += getValue(); } return stringToReturn; } DSpaceCommandLineParameter(String key, String value); protected  DSpaceCommandLineParameter(String parameter); String getName(); void setName(String key); String getValue(); void setValue(String value); String toString(); static String concatenate(List<DSpaceCommandLineParameter> parameterList); @Override boolean equals(Object other); @Override int hashCode(); }
DSpaceCommandLineParameter { public String toString() { String stringToReturn = ""; stringToReturn += getName(); if (StringUtils.isNotBlank(getValue())) { stringToReturn += " "; stringToReturn += getValue(); } return stringToReturn; } DSpaceCommandLineParameter(String key, String value); protected  DSpaceCommandLineParameter(String parameter); String getName(); void setName(String key); String getValue(); void setValue(String value); String toString(); static String concatenate(List<DSpaceCommandLineParameter> parameterList); @Override boolean equals(Object other); @Override int hashCode(); static String SEPARATOR; }