use of org.activityinfo.model.type.SerialNumber in project activityinfo by bedatadriven.
the class FormInputViewModelTest method testSerialNumberEdit.
@Test
public void testSerialNumberEdit() {
IntakeForm intakeForm = setup.getCatalog().getIntakeForm();
RecordRef ref = intakeForm.getRecords().get(0).getRef();
FormStructure structure = fetchStructure(ref);
FormInputViewModelBuilder builder = builderFor(structure);
FormInputModel model = new FormInputModel(ref);
FormInputViewModel viewModel = builder.build(model, structure.getExistingRecord());
assertThat(viewModel.getField(intakeForm.getProtectionCodeFieldId()), equalTo(new SerialNumber(1)));
}
Aggregations