@Test public void testValidate() { ScalebarAttribute attribute = new ScalebarAttribute(); List<Throwable> validationErrors = new ArrayList<>(); Configuration configuration = new Configuration(); attribute.validate(validationErrors, configuration); assertEquals(2, validationErrors.size()); }
@Override public final void validate(final List<Throwable> validationErrors, final Configuration configuration) { if (this.width == null || this.width < 1) { validationErrors.add(new ConfigurationException( "width field is not legal: " + this.width + " in " + getClass().getName())); } if (this.height == null || this.height < 1) { validationErrors.add(new ConfigurationException( "height field is not legal: " + this.height + " in " + getClass().getName())); } }
ScalebarAttribute extends ReflectiveAttribute<ScalebarAttribute.ScalebarAttributeValues> { @Override public final void validate(final List<Throwable> validationErrors, final Configuration configuration) { if (this.width == null || this.width < 1) { validationErrors.add(new ConfigurationException( "width field is not legal: " + this.width + " in " + getClass().getName())); } if (this.height == null || this.height < 1) { validationErrors.add(new ConfigurationException( "height field is not legal: " + this.height + " in " + getClass().getName())); } } }
ScalebarAttribute extends ReflectiveAttribute<ScalebarAttribute.ScalebarAttributeValues> { @Override public final void validate(final List<Throwable> validationErrors, final Configuration configuration) { if (this.width == null || this.width < 1) { validationErrors.add(new ConfigurationException( "width field is not legal: " + this.width + " in " + getClass().getName())); } if (this.height == null || this.height < 1) { validationErrors.add(new ConfigurationException( "height field is not legal: " + this.height + " in " + getClass().getName())); } }  }
ScalebarAttribute extends ReflectiveAttribute<ScalebarAttribute.ScalebarAttributeValues> { @Override public final void validate(final List<Throwable> validationErrors, final Configuration configuration) { if (this.width == null || this.width < 1) { validationErrors.add(new ConfigurationException( "width field is not legal: " + this.width + " in " + getClass().getName())); } if (this.height == null || this.height < 1) { validationErrors.add(new ConfigurationException( "height field is not legal: " + this.height + " in " + getClass().getName())); } }  @Override final void validate(final List<Throwable> validationErrors, final Configuration configuration); @Override final ScalebarAttributeValues createValue(final Template template); @Override final Class<? extends ScalebarAttributeValues> getValueType(); final Integer getWidth(); final void setWidth(final Integer width); final Integer getHeight(); final void setHeight(final Integer height); final Boolean getCreateSubReport(); final void setCreateSubReport(final Boolean createSubReport); }
ScalebarAttribute extends ReflectiveAttribute<ScalebarAttribute.ScalebarAttributeValues> { @Override public final void validate(final List<Throwable> validationErrors, final Configuration configuration) { if (this.width == null || this.width < 1) { validationErrors.add(new ConfigurationException( "width field is not legal: " + this.width + " in " + getClass().getName())); } if (this.height == null || this.height < 1) { validationErrors.add(new ConfigurationException( "height field is not legal: " + this.height + " in " + getClass().getName())); } }  @Override final void validate(final List<Throwable> validationErrors, final Configuration configuration); @Override final ScalebarAttributeValues createValue(final Template template); @Override final Class<? extends ScalebarAttributeValues> getValueType(); final Integer getWidth(); final void setWidth(final Integer width); final Integer getHeight(); final void setHeight(final Integer height); final Boolean getCreateSubReport(); final void setCreateSubReport(final Boolean createSubReport);  }