@Test public void testGetErrorMessage() throws Exception { final Validation validation = InRange.build(2, 4); final String errorMessage = validation.getErrorMessage(mActivity); assertNotNull(errorMessage); assertTrue(errorMessage.contains(Integer.toString(2))); assertTrue(errorMessage.contains(Integer.toString(4))); }
@Override public String getErrorMessage(final Context context) { return context.getString(R.string.formvalidations_not_in_range, mMin, mMax); }
InRange implements Validation { @Override public String getErrorMessage(final Context context) { return context.getString(R.string.formvalidations_not_in_range, mMin, mMax); } }
InRange implements Validation { @Override public String getErrorMessage(final Context context) { return context.getString(R.string.formvalidations_not_in_range, mMin, mMax); } private  InRange(final int min, final int max); }
InRange implements Validation { @Override public String getErrorMessage(final Context context) { return context.getString(R.string.formvalidations_not_in_range, mMin, mMax); } private  InRange(final int min, final int max); static Validation build(final int min, final int max); @Override String getErrorMessage(final Context context); @Override boolean isValid(final String text); }
InRange implements Validation { @Override public String getErrorMessage(final Context context) { return context.getString(R.string.formvalidations_not_in_range, mMin, mMax); } private  InRange(final int min, final int max); static Validation build(final int min, final int max); @Override String getErrorMessage(final Context context); @Override boolean isValid(final String text);  }