@Test public void testLengthConstraintDescriptionOneBound() { Map<String, Serializable> params = min.getDescription().getParameters(); assertEquals(1, params.size()); assertTrue(params.containsKey("Minimum")); assertEquals(MIN, params.get("Minimum")); }
@Override public Description getDescription() { Map<String, Serializable> params = new HashMap<>(); if (min != null) { params.put(PNAME_MIN_LENGTH, min); } if (max != null) { params.put(PNAME_MAX_LENGTH, max); } return new Description(LengthConstraint.NAME, params); }
LengthConstraint extends AbstractConstraint { @Override public Description getDescription() { Map<String, Serializable> params = new HashMap<>(); if (min != null) { params.put(PNAME_MIN_LENGTH, min); } if (max != null) { params.put(PNAME_MAX_LENGTH, max); } return new Description(LengthConstraint.NAME, params); } }
LengthConstraint extends AbstractConstraint { @Override public Description getDescription() { Map<String, Serializable> params = new HashMap<>(); if (min != null) { params.put(PNAME_MIN_LENGTH, min); } if (max != null) { params.put(PNAME_MAX_LENGTH, max); } return new Description(LengthConstraint.NAME, params); } LengthConstraint(Object min, Object max); }
LengthConstraint extends AbstractConstraint { @Override public Description getDescription() { Map<String, Serializable> params = new HashMap<>(); if (min != null) { params.put(PNAME_MIN_LENGTH, min); } if (max != null) { params.put(PNAME_MAX_LENGTH, max); } return new Description(LengthConstraint.NAME, params); } LengthConstraint(Object min, Object max); @Override boolean validate(Object object); @Override Description getDescription(); Long getMin(); Long getMax(); @Override String getErrorMessage(Object invalidValue, Locale locale); @Override int hashCode(); @Override boolean equals(Object obj); }
LengthConstraint extends AbstractConstraint { @Override public Description getDescription() { Map<String, Serializable> params = new HashMap<>(); if (min != null) { params.put(PNAME_MIN_LENGTH, min); } if (max != null) { params.put(PNAME_MAX_LENGTH, max); } return new Description(LengthConstraint.NAME, params); } LengthConstraint(Object min, Object max); @Override boolean validate(Object object); @Override Description getDescription(); Long getMin(); Long getMax(); @Override String getErrorMessage(Object invalidValue, Locale locale); @Override int hashCode(); @Override boolean equals(Object obj);  }