Search in sources :

Example 1 with OtherCustomField

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));
}
Also used : OtherCustomField(com.netsuite.webservices.test.setup.customization.OtherCustomField) CustomFieldType(com.netsuite.webservices.test.setup.customization.CustomFieldType) Test(org.junit.Test)

Aggregations

CustomFieldType (com.netsuite.webservices.test.setup.customization.CustomFieldType)1 OtherCustomField (com.netsuite.webservices.test.setup.customization.OtherCustomField)1 Test (org.junit.Test)1