use of org.apache.camel.component.salesforce.api.dto.approval.ApprovalRequests in project camel by apache.
the class AbstractRestProcessorApprovalTest method shouldFetchApprovalRequestFromHeader.
@Test
public void shouldFetchApprovalRequestFromHeader() throws SalesforceException {
final ApprovalRequest request = new ApprovalRequest();
request.setComments("hi there");
final TestRestProcessor processor = sendBodyAndHeader(null, request);
verify(processor).getRequestStream(new ApprovalRequests(request));
}
use of org.apache.camel.component.salesforce.api.dto.approval.ApprovalRequests in project camel by apache.
the class AbstractRestProcessorApprovalTest method shouldFetchApprovalRequestFromHeaderEvenIfBodyIsDefinedButNotConvertable.
@Test
public void shouldFetchApprovalRequestFromHeaderEvenIfBodyIsDefinedButNotConvertable() throws SalesforceException {
final ApprovalRequest request = new ApprovalRequest();
request.setComments("hi there");
final TestRestProcessor processor = sendBodyAndHeaders("Nothing to see here", request, Collections.singletonMap("approval.ContextId", "context-id"));
final ApprovalRequest combined = new ApprovalRequest();
combined.setComments("hi there");
combined.setContextId("context-id");
verify(processor).getRequestStream(new ApprovalRequests(combined));
}
use of org.apache.camel.component.salesforce.api.dto.approval.ApprovalRequests in project camel by apache.
the class AbstractRestProcessorApprovalTest method shouldFetchApprovalRequestFromBody.
@Test
public void shouldFetchApprovalRequestFromBody() throws SalesforceException {
final ApprovalRequest approvalRequest = new ApprovalRequest();
approvalRequest.setComments("it should be me");
final TestRestProcessor processor = sendBody(approvalRequest);
verify(processor).getRequestStream(new ApprovalRequests(approvalRequest));
}
use of org.apache.camel.component.salesforce.api.dto.approval.ApprovalRequests in project camel by apache.
the class AbstractRestProcessorApprovalTest method shouldFetchApprovalRequestsFromBody.
@Test
public void shouldFetchApprovalRequestsFromBody() throws SalesforceException {
final ApprovalRequest approvalRequest1 = new ApprovalRequest();
approvalRequest1.setComments("it should be me first");
final ApprovalRequest approvalRequest2 = new ApprovalRequest();
approvalRequest2.setComments("it should be me second");
final TestRestProcessor processor = sendBody(Arrays.asList(approvalRequest1, approvalRequest2));
verify(processor).getRequestStream(new ApprovalRequests(Arrays.asList(approvalRequest1, approvalRequest2)));
}
Aggregations