@Test public void testInitializeWithoutParams() { fieldElementParams.clear(); initializer.initialize(field, fieldElement, context); verify(field).setMax(any()); assertEquals(Integer.valueOf(-1), field.getMax()); }
@Override public void initialize(AssigneeEditorFieldDefinition field, FieldElement fieldElement, FormGenerationContext context) { field.setDefaultValue(fieldElement.getParams().getOrDefault("defaultValue", "")); field.setType(AssigneeType.valueOf(fieldElement.getParams().getOrDefault("type", "USER"))); field.setMax(Integer.valueOf(fieldElement.getParams().getOrDefault("max", "-1"))); }
AssigneeFieldInitializer implements FieldInitializer<AssigneeEditorFieldDefinition> { @Override public void initialize(AssigneeEditorFieldDefinition field, FieldElement fieldElement, FormGenerationContext context) { field.setDefaultValue(fieldElement.getParams().getOrDefault("defaultValue", "")); field.setType(AssigneeType.valueOf(fieldElement.getParams().getOrDefault("type", "USER"))); field.setMax(Integer.valueOf(fieldElement.getParams().getOrDefault("max", "-1"))); } }
AssigneeFieldInitializer implements FieldInitializer<AssigneeEditorFieldDefinition> { @Override public void initialize(AssigneeEditorFieldDefinition field, FieldElement fieldElement, FormGenerationContext context) { field.setDefaultValue(fieldElement.getParams().getOrDefault("defaultValue", "")); field.setType(AssigneeType.valueOf(fieldElement.getParams().getOrDefault("type", "USER"))); field.setMax(Integer.valueOf(fieldElement.getParams().getOrDefault("max", "-1"))); }  }
AssigneeFieldInitializer implements FieldInitializer<AssigneeEditorFieldDefinition> { @Override public void initialize(AssigneeEditorFieldDefinition field, FieldElement fieldElement, FormGenerationContext context) { field.setDefaultValue(fieldElement.getParams().getOrDefault("defaultValue", "")); field.setType(AssigneeType.valueOf(fieldElement.getParams().getOrDefault("type", "USER"))); field.setMax(Integer.valueOf(fieldElement.getParams().getOrDefault("max", "-1"))); }  @Override boolean supports(FieldDefinition fieldDefinition); @Override void initialize(AssigneeEditorFieldDefinition field,
                           FieldElement fieldElement,
                           FormGenerationContext context); }
AssigneeFieldInitializer implements FieldInitializer<AssigneeEditorFieldDefinition> { @Override public void initialize(AssigneeEditorFieldDefinition field, FieldElement fieldElement, FormGenerationContext context) { field.setDefaultValue(fieldElement.getParams().getOrDefault("defaultValue", "")); field.setType(AssigneeType.valueOf(fieldElement.getParams().getOrDefault("type", "USER"))); field.setMax(Integer.valueOf(fieldElement.getParams().getOrDefault("max", "-1"))); }  @Override boolean supports(FieldDefinition fieldDefinition); @Override void initialize(AssigneeEditorFieldDefinition field,
                           FieldElement fieldElement,
                           FormGenerationContext context);  }