use of com.netsuite.webservices.test.setup.customization.CustomRecordSearch in project components by Talend.
the class SearchQueryTest method testSearchMultiSelectField.
@Test
public void testSearchMultiSelectField() throws Exception {
clientService.getMetaDataSource().setCustomMetaDataSource(new TestCustomMetaDataSource());
SearchQuery s1 = clientService.newSearch();
s1.target("custom_record_type_1");
s1.condition(new SearchCondition("Owner", "List.anyOf", Arrays.asList("123456789")));
SearchRecord sr1 = (SearchRecord) s1.toNativeQuery();
assertNotNull(sr1);
Assert.assertEquals(CustomRecordSearch.class, sr1.getClass());
CustomRecordSearch search = (CustomRecordSearch) sr1;
assertNotNull(search.getBasic());
CustomRecordSearchBasic searchBasic = search.getBasic();
assertNotNull(searchBasic.getOwner());
SearchMultiSelectField sf1 = searchBasic.getOwner();
assertNotNull(sf1.getSearchValue());
Assert.assertEquals(1, sf1.getSearchValue().size());
Assert.assertEquals("123456789", sf1.getSearchValue().get(0).getInternalId());
}
Aggregations