@Test public void testFormatNullStructure() throws Exception { IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> { formatter.format(null); }); assertThat(e.getMessage()).isEqualTo("Record structure cannot be null."); }
public String format(final RecordStructure structure) throws MavenReportException { if (structure == null) { throw new IllegalArgumentException("Record structure cannot be null."); } final StringBuilder definitionBuilder = new StringBuilder(); for (int i = 0, size = structure.getRootLevelMemberCount(); i < size; i++) { final RecordStructureMember member = structure.getRootLevelMember(i); if (member instanceof RecordStructureField) { definitionBuilder.append(fieldFormatter.format((RecordStructureField) member)); } else if (member instanceof AbstractParentRecordStructureMember) { definitionBuilder.append(listFormatter.format((AbstractParentRecordStructureMember) member)); } else { definitionBuilder.append(includeFormatter.format((RecordInclude) member)); } } return definitionBuilder.toString(); }
RecordStructureFormatter { public String format(final RecordStructure structure) throws MavenReportException { if (structure == null) { throw new IllegalArgumentException("Record structure cannot be null."); } final StringBuilder definitionBuilder = new StringBuilder(); for (int i = 0, size = structure.getRootLevelMemberCount(); i < size; i++) { final RecordStructureMember member = structure.getRootLevelMember(i); if (member instanceof RecordStructureField) { definitionBuilder.append(fieldFormatter.format((RecordStructureField) member)); } else if (member instanceof AbstractParentRecordStructureMember) { definitionBuilder.append(listFormatter.format((AbstractParentRecordStructureMember) member)); } else { definitionBuilder.append(includeFormatter.format((RecordInclude) member)); } } return definitionBuilder.toString(); } }
RecordStructureFormatter { public String format(final RecordStructure structure) throws MavenReportException { if (structure == null) { throw new IllegalArgumentException("Record structure cannot be null."); } final StringBuilder definitionBuilder = new StringBuilder(); for (int i = 0, size = structure.getRootLevelMemberCount(); i < size; i++) { final RecordStructureMember member = structure.getRootLevelMember(i); if (member instanceof RecordStructureField) { definitionBuilder.append(fieldFormatter.format((RecordStructureField) member)); } else if (member instanceof AbstractParentRecordStructureMember) { definitionBuilder.append(listFormatter.format((AbstractParentRecordStructureMember) member)); } else { definitionBuilder.append(includeFormatter.format((RecordInclude) member)); } } return definitionBuilder.toString(); } RecordStructureFormatter(final VelocityEngine engine);  RecordStructureFormatter(final FieldFormatter fieldFormatter, final ParentalMemberFormatter listFormatter,
            final IncludeFormatter includeFormatter); }
RecordStructureFormatter { public String format(final RecordStructure structure) throws MavenReportException { if (structure == null) { throw new IllegalArgumentException("Record structure cannot be null."); } final StringBuilder definitionBuilder = new StringBuilder(); for (int i = 0, size = structure.getRootLevelMemberCount(); i < size; i++) { final RecordStructureMember member = structure.getRootLevelMember(i); if (member instanceof RecordStructureField) { definitionBuilder.append(fieldFormatter.format((RecordStructureField) member)); } else if (member instanceof AbstractParentRecordStructureMember) { definitionBuilder.append(listFormatter.format((AbstractParentRecordStructureMember) member)); } else { definitionBuilder.append(includeFormatter.format((RecordInclude) member)); } } return definitionBuilder.toString(); } RecordStructureFormatter(final VelocityEngine engine);  RecordStructureFormatter(final FieldFormatter fieldFormatter, final ParentalMemberFormatter listFormatter,
            final IncludeFormatter includeFormatter); String format(final RecordStructure structure); }
RecordStructureFormatter { public String format(final RecordStructure structure) throws MavenReportException { if (structure == null) { throw new IllegalArgumentException("Record structure cannot be null."); } final StringBuilder definitionBuilder = new StringBuilder(); for (int i = 0, size = structure.getRootLevelMemberCount(); i < size; i++) { final RecordStructureMember member = structure.getRootLevelMember(i); if (member instanceof RecordStructureField) { definitionBuilder.append(fieldFormatter.format((RecordStructureField) member)); } else if (member instanceof AbstractParentRecordStructureMember) { definitionBuilder.append(listFormatter.format((AbstractParentRecordStructureMember) member)); } else { definitionBuilder.append(includeFormatter.format((RecordInclude) member)); } } return definitionBuilder.toString(); } RecordStructureFormatter(final VelocityEngine engine);  RecordStructureFormatter(final FieldFormatter fieldFormatter, final ParentalMemberFormatter listFormatter,
            final IncludeFormatter includeFormatter); String format(final RecordStructure structure);  }