@Test public void shouldToPredicateReturnStringWithEmptySpaceBetweenComasForNullParameter() throws Exception { predicate = new AbstractPredicate("name", 1l, null, 2l) { }; Mockito.when(serializer.serialize(Mockito.any())).thenReturn("param"); String result = predicate.toString(serializer); Assert.assertEquals("name(param;;param)", result); }
@Override public String toString(ParameterSerializer serializer) { return parameters.length > 0 ? String.format("%s(%s)", name, getSerializedParameters(serializer)) : name; }
AbstractPredicate implements Predicate { @Override public String toString(ParameterSerializer serializer) { return parameters.length > 0 ? String.format("%s(%s)", name, getSerializedParameters(serializer)) : name; } }
AbstractPredicate implements Predicate { @Override public String toString(ParameterSerializer serializer) { return parameters.length > 0 ? String.format("%s(%s)", name, getSerializedParameters(serializer)) : name; } AbstractPredicate(String name, Object... parameters); }
AbstractPredicate implements Predicate { @Override public String toString(ParameterSerializer serializer) { return parameters.length > 0 ? String.format("%s(%s)", name, getSerializedParameters(serializer)) : name; } AbstractPredicate(String name, Object... parameters); @Override String toString(ParameterSerializer serializer); @Override String toString(); }
AbstractPredicate implements Predicate { @Override public String toString(ParameterSerializer serializer) { return parameters.length > 0 ? String.format("%s(%s)", name, getSerializedParameters(serializer)) : name; } AbstractPredicate(String name, Object... parameters); @Override String toString(ParameterSerializer serializer); @Override String toString();  }