示例#1
0
  @Test
  public void isTrimmingByDefault() {
    // default
    assertTrue(group.isTrimmingByDefault());

    // set value
    group.setTrimmingByDefault(false);
    assertFalse(group.isTrimmingByDefault());
  }
示例#2
0
  private void assertTrimByDefault(
      Boolean parentValue, Boolean overrideValue, boolean expectedValue) throws Exception {
    init();

    if (parentValue != null) {
      group1.setTrimmingByDefault(parentValue);
    }

    group1.afterPropertiesSet();

    if (overrideValue != null) {
      group2.setTrimmingByDefault(overrideValue);
    }

    group2.setParentGroup("group1");
    group2.afterPropertiesSet();

    formConfig.setGroupConfigImplList(createGroupList(group1, group2));
    formConfig.afterPropertiesSet();

    assertEquals(expectedValue, group2.isTrimmingByDefault());
  }