buildInputForBatchPathAndUpdate(mockRequest);
}
else
{
EasyMock.expect(mockRequest.getInputRecord()).andReturn(mockRecordTemplate).times(2);
EasyMock.expect(mockRequest.getResourceSpec()).andReturn(new ResourceSpecImpl()).once();
}
if (method == ResourceMethod.GET)
{
EasyMock.expect(((GetRequest)mockRequest).getObjectId()).andReturn(null).once();
EasyMock.expect(((GetRequest)mockRequest).getResourceSpec()).andReturn(new ResourceSpecImpl()).once();
EasyMock.expect(mockRequest.getMethodName()).andReturn(null);
}
else if (method == ResourceMethod.BATCH_GET)
{
EasyMock.expect(mockRequest.getMethodName()).andReturn(null);
}
else if (method == ResourceMethod.ACTION)
{
EasyMock.expect(((ActionRequest)mockRequest).getId()).andReturn(null);
EasyMock.expect(mockRequest.getMethodName()).andReturn("testAction");
}
else if (method == ResourceMethod.FINDER)
{
EasyMock.expect(((FindRequest)mockRequest).getAssocKey()).andReturn(new CompoundKey());
EasyMock.expect(mockRequest.getMethodName()).andReturn("testFinder");
}
else if (method == ResourceMethod.GET_ALL)
{
EasyMock.expect(((GetAllRequest)mockRequest).getAssocKey()).andReturn(new CompoundKey());
EasyMock.expect(mockRequest.getMethodName()).andReturn(null);
}
else if (method == ResourceMethod.UPDATE)
{
EasyMock.expect(((UpdateRequest) mockRequest).getResourceSpec()).andReturn(new ResourceSpecImpl()).once();
EasyMock.expect(((UpdateRequest)mockRequest).getId()).andReturn(null);
EasyMock.expect(mockRequest.getMethodName()).andReturn(null);
}
else if (method == ResourceMethod.PARTIAL_UPDATE)
{
EasyMock.expect(mockRequest.getResourceSpec()).andReturn(new ResourceSpecImpl()).times(2);
EasyMock.expect(((PartialUpdateRequest)mockRequest).getId()).andReturn(null);
EasyMock.expect(mockRequest.getMethodName()).andReturn(null);
}
else if (method == ResourceMethod.DELETE)
{
EasyMock.expect(((DeleteRequest)mockRequest).getResourceSpec()).andReturn(new ResourceSpecImpl()).once();
EasyMock.expect(((DeleteRequest)mockRequest).getId()).andReturn(null);
EasyMock.expect(mockRequest.getMethodName()).andReturn(null);
}
else
{