use of com.netsuite.webservices.test.platform.messages.UpdateListResponse in project components by Talend.
the class NetSuiteClientServiceTest method testUpdateList.
@Test
public void testUpdateList() throws Exception {
TypeDesc typeDesc = clientService.getMetaDataSource().getTypeInfo("PurchaseOrder");
List<PurchaseOrder> recordList = makeNsObjects(new NsObjectComposer<PurchaseOrder>(clientService.getMetaDataSource(), typeDesc), 10);
UpdateListResponse response = new UpdateListResponse();
response.setWriteResponseList(createSuccessWriteResponseList(recordList.size()));
when(port.updateList(notNull(UpdateListRequest.class))).thenReturn(response);
clientService.updateList(recordList);
verify(port, times(1)).login(notNull(LoginRequest.class));
verify(port, times(1)).updateList(notNull(UpdateListRequest.class));
List<NsWriteResponse<RecordRef>> writeResponses = clientService.updateList(null);
assertTrue(writeResponses.isEmpty());
}
Aggregations