Ejemplo n.º 1
0
    @Test
    public void shouldReturnFalseStringWhenFalseBooleanIsSupplied() throws Exception {
      BooleanField field =
          new BooleanField(new HashMap<String, Object>(), _spanishLocale, _usLocale);
      field.setCurrentValue(false);

      assertEquals("false", field.toData());
    }
Ejemplo n.º 2
0
    @Test
    public void shouldReturnNullWhenNullBooleanIsSupplied() throws Exception {
      BooleanField field =
          new BooleanField(new HashMap<String, Object>(), _spanishLocale, _usLocale);
      field.setCurrentValue(null);

      assertNull(field.toData());
    }