@Test public void testGetSetterCommandsI4Unset() { final String fieldName = "i4_field"; final String recordName = "record_name"; final Field field = mockField(fieldName, DataType.I4); final Structure struct = mockStructure(field); final Record record = mockRecord(recordName, struct); when(record.getI4(fieldName)).thenReturn(Integer.valueOf(0)); assertThat(RecordSetter.getSetterCommands(record)).isEmpty(); }
public static List<String> getSetterCommands(final Record record) { final List<String> commands = new ArrayList<String>(); final BreadCrumb rootCrumb = new BreadCrumb(record.getName()); for (final Field field : record.getStructure().getFields()) getSetterCommands(rootCrumb, field, record, commands); return commands; }
RecordSetter { public static List<String> getSetterCommands(final Record record) { final List<String> commands = new ArrayList<String>(); final BreadCrumb rootCrumb = new BreadCrumb(record.getName()); for (final Field field : record.getStructure().getFields()) getSetterCommands(rootCrumb, field, record, commands); return commands; } }
RecordSetter { public static List<String> getSetterCommands(final Record record) { final List<String> commands = new ArrayList<String>(); final BreadCrumb rootCrumb = new BreadCrumb(record.getName()); for (final Field field : record.getStructure().getFields()) getSetterCommands(rootCrumb, field, record, commands); return commands; }  }
RecordSetter { public static List<String> getSetterCommands(final Record record) { final List<String> commands = new ArrayList<String>(); final BreadCrumb rootCrumb = new BreadCrumb(record.getName()); for (final Field field : record.getStructure().getFields()) getSetterCommands(rootCrumb, field, record, commands); return commands; }  static List<String> getSetterCommands(final Record record); }
RecordSetter { public static List<String> getSetterCommands(final Record record) { final List<String> commands = new ArrayList<String>(); final BreadCrumb rootCrumb = new BreadCrumb(record.getName()); for (final Field field : record.getStructure().getFields()) getSetterCommands(rootCrumb, field, record, commands); return commands; }  static List<String> getSetterCommands(final Record record);  }