@Test public void toString_should_return_a_valid_string() { Collection<PathParameter> pathParameters = newArrayList(new PathParameter(ClassName.valueOf("fr.vidal.oss.Foo"),"Foo"),new PathParameter(ClassName.valueOf("fr.vidal.oss.Bar"),"Bar")); ApiPath apiPath = new ApiPath("/dev/null",pathParameters); assertThat(apiPath.toString()).isEqualTo("/dev/null (fr.vidal.oss.Foo Foo,fr.vidal.oss.Bar Bar)"); }
@Override public String toString() { if (pathParameters.isEmpty()) { return path; } return String.format("%s (%s)", path, pathParameters.stream().map(PathParameter::toString).collect(joining(","))); }
ApiPath { @Override public String toString() { if (pathParameters.isEmpty()) { return path; } return String.format("%s (%s)", path, pathParameters.stream().map(PathParameter::toString).collect(joining(","))); } }
ApiPath { @Override public String toString() { if (pathParameters.isEmpty()) { return path; } return String.format("%s (%s)", path, pathParameters.stream().map(PathParameter::toString).collect(joining(","))); } ApiPath(String path, Collection<PathParameter> pathParameters); }
ApiPath { @Override public String toString() { if (pathParameters.isEmpty()) { return path; } return String.format("%s (%s)", path, pathParameters.stream().map(PathParameter::toString).collect(joining(","))); } ApiPath(String path, Collection<PathParameter> pathParameters); String getPath(); Collection<PathParameter> getPathParameters(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
ApiPath { @Override public String toString() { if (pathParameters.isEmpty()) { return path; } return String.format("%s (%s)", path, pathParameters.stream().map(PathParameter::toString).collect(joining(","))); } ApiPath(String path, Collection<PathParameter> pathParameters); String getPath(); Collection<PathParameter> getPathParameters(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }