use of com.netsuite.webservices.test.setup.customization.OtherCustomField in project components by Talend.
the class CustomFieldAdaptersTest method testAdapterForGenericCustomField.
@Test
public void testAdapterForGenericCustomField() {
OtherCustomField customField = new OtherCustomField();
customField.setFieldType(CustomizationFieldType.HYPERLINK);
DefaultCustomFieldAdapter<CustomFieldType> adapter1 = new DefaultCustomFieldAdapter<>(BasicRecordType.OTHER_CUSTOM_FIELD, true);
assertTrue(adapter1.appliesTo("opportunity", customField));
assertEquals(CustomFieldRefType.STRING, adapter1.apply(customField));
DefaultCustomFieldAdapter<CustomFieldType> adapter2 = new DefaultCustomFieldAdapter<>(BasicRecordType.OTHER_CUSTOM_FIELD, false);
assertFalse(adapter2.appliesTo("opportunity", customField));
}
Aggregations