use of com.netsuite.webservices.v2014_2.platform.core.types.SearchRecordType in project components by Talend.
the class NetSuiteClientServiceTest method testStandardMetaData.
@Test
public void testStandardMetaData() throws Exception {
NetSuiteClientService<?> clientService = webServiceMockTestFixture.getClientService();
Set<SearchRecordType> searchRecordTypeSet = new HashSet<>(Arrays.asList(SearchRecordType.values()));
Set<String> searchRecordTypeNameSet = new HashSet<>();
for (SearchRecordType searchRecordType : searchRecordTypeSet) {
searchRecordTypeNameSet.add(toInitialUpper(searchRecordType.value()));
}
searchRecordTypeNameSet.add("InventoryDetail");
searchRecordTypeNameSet.add("TimeEntry");
for (String searchRecordType : searchRecordTypeNameSet) {
try {
SearchRecordTypeDesc searchRecordInfo = clientService.getMetaDataSource().getSearchRecordType(searchRecordType);
assertNotNull("Search record def found: " + searchRecordType, searchRecordInfo);
} catch (Exception e) {
throw new AssertionError("Search record type: " + searchRecordType, e);
}
}
Set<RecordType> recordTypeSet = new HashSet<>(Arrays.asList(RecordType.values()));
Set<String> recordTypeNameSet = new HashSet<>();
for (RecordType recordType : recordTypeSet) {
recordTypeNameSet.add(toInitialUpper(recordType.value()));
}
recordTypeNameSet.add("InventoryDetail");
recordTypeNameSet.add("TimeEntry");
for (String recordType : recordTypeNameSet) {
RecordTypeInfo recordTypeInfo = clientService.getMetaDataSource().getRecordType(recordType);
assertNotNull("Record type def found: " + recordType, recordTypeInfo);
}
}
use of com.netsuite.webservices.v2014_2.platform.core.types.SearchRecordType in project components by Talend.
the class NetSuiteClientServiceTest method testBasicMetaData.
@Test
public void testBasicMetaData() throws Exception {
NetSuiteClientService<?> clientService = webServiceMockTestFixture.getClientService();
Set<SearchRecordType> searchRecordTypeSet = new HashSet<>(Arrays.asList(SearchRecordType.values()));
Set<String> searchRecordTypeNameSet = new HashSet<>();
for (SearchRecordType searchRecordType : searchRecordTypeSet) {
searchRecordTypeNameSet.add(toInitialUpper(searchRecordType.value()));
}
searchRecordTypeNameSet.add("Address");
searchRecordTypeNameSet.add("InventoryDetail");
searchRecordTypeNameSet.add("TimeEntry");
for (String searchRecordType : searchRecordTypeNameSet) {
try {
SearchRecordTypeDesc searchRecordInfo = clientService.getMetaDataSource().getSearchRecordType(searchRecordType);
assertNotNull("Search record def found: " + searchRecordType, searchRecordInfo);
} catch (Exception e) {
throw new AssertionError("Search record type: " + searchRecordType, e);
}
}
Set<RecordType> recordTypeSet = new HashSet<>(Arrays.asList(RecordType.values()));
recordTypeSet.remove(RecordType.CUSTOM_TRANSACTION_TYPE);
Set<String> recordTypeNameSet = new HashSet<>();
for (RecordType recordType : recordTypeSet) {
recordTypeNameSet.add(toInitialUpper(recordType.value()));
}
recordTypeNameSet.add("Address");
recordTypeNameSet.add("InventoryDetail");
recordTypeNameSet.add("TimeEntry");
for (String recordType : recordTypeNameSet) {
RecordTypeInfo recordTypeInfo = clientService.getMetaDataSource().getRecordType(recordType);
assertNotNull("Record type def found: " + recordType, recordTypeInfo);
}
Collection<SearchFieldOperatorName> searchOperatorNames = clientService.getBasicMetaData().getSearchOperatorNames();
List<SearchFieldOperatorName> searchFieldOperatorNameList = new ArrayList<>(searchOperatorNames);
Collections.sort(searchFieldOperatorNameList, new Comparator<SearchFieldOperatorName>() {
@Override
public int compare(SearchFieldOperatorName o1, SearchFieldOperatorName o2) {
return o1.getQualifiedName().compareTo(o2.getQualifiedName());
}
});
for (SearchFieldOperatorName operatorName : searchFieldOperatorNameList) {
assertNotNull(operatorName.getDataType());
if (!SearchFieldOperatorType.BOOLEAN.dataTypeEquals(operatorName.getDataType())) {
assertNotNull(operatorName.getName());
}
}
}
Aggregations