use of org.motechproject.mds.testutil.records.Record2 in project motech by motech.
the class CsvImporterExporterTest method testInstances.
private List<Record2> testInstances(IdMode idMode) {
List<Record2> instances = new ArrayList<>();
for (int i = 0; i < INSTANCE_COUNT; i++) {
Record2 record = new Record2();
if (idMode == IdMode.INCLUDE_ID) {
record.setId((long) i);
}
record.setCreator("the creator " + i);
record.setOwner("the owner " + i);
record.setModifiedBy("username" + i);
record.setCreationDate(NOW.plusMinutes(i));
record.setModificationDate(NOW.plusHours(i));
record.setValue("value " + i);
record.setDate(NOW.plusSeconds(i).toDate());
record.setDateIgnoredByRest(NOW.minusHours(i).toDate());
record.setEnumField(enumValue(i));
record.setEnumListField(Arrays.asList(enumValue(i + 1), enumValue(i + 2)));
record.setSingleRelationship(new RelatedClass(relatedId(i)));
record.setMultiRelationship(new ArrayList<>((Arrays.asList(new RelatedClass(relatedId(i + 1)), new RelatedClass(relatedId(i + 2))))));
instances.add(record);
}
return instances;
}
Aggregations