@Test public void whenInputIsOneOfPredefinedTrueValues_ThenShouldReturnBooleanTrueValue() { assertThat(booleanTypeConverter.convert("true")).isTrue(); assertThat(booleanTypeConverter.convert("TRUE")).isTrue(); assertThat(booleanTypeConverter.convert("1")).isTrue(); assertThat(booleanTypeConverter.convert("on")).isTrue(); assertThat(booleanTypeConverter.convert("ON")).isTrue(); assertThat(booleanTypeConverter.convert("yes")).isTrue(); assertThat(booleanTypeConverter.convert("YES")).isTrue(); }
@Override public Boolean convert(final String value) { return Boolean.parseBoolean(value) || "1".equals(value) || "on".equalsIgnoreCase(value) || "yes".equalsIgnoreCase(value); }
BooleanTypeConverter implements TypeConverter<String, Boolean> { @Override public Boolean convert(final String value) { return Boolean.parseBoolean(value) || "1".equals(value) || "on".equalsIgnoreCase(value) || "yes".equalsIgnoreCase(value); } }
BooleanTypeConverter implements TypeConverter<String, Boolean> { @Override public Boolean convert(final String value) { return Boolean.parseBoolean(value) || "1".equals(value) || "on".equalsIgnoreCase(value) || "yes".equalsIgnoreCase(value); }  }
BooleanTypeConverter implements TypeConverter<String, Boolean> { @Override public Boolean convert(final String value) { return Boolean.parseBoolean(value) || "1".equals(value) || "on".equalsIgnoreCase(value) || "yes".equalsIgnoreCase(value); }  @Override Boolean convert(final String value); }
BooleanTypeConverter implements TypeConverter<String, Boolean> { @Override public Boolean convert(final String value) { return Boolean.parseBoolean(value) || "1".equals(value) || "on".equalsIgnoreCase(value) || "yes".equalsIgnoreCase(value); }  @Override Boolean convert(final String value);  }