Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

How can I access the content of a static resource zip file to create several callout mocks?

I'd like to group all service responses in a single zip file without create several static resources. In the docs I find only

MultiStaticResourceCalloutMock multimock = new MultiStaticResourceCalloutMock(); multimock.setStaticResource( 'http://api.salesforce.com/foo/bar', 'mockResponse'); multimock.setStaticResource( 'http://api.salesforce.com/foo/sfdc', 'mockResponse2');

but no mention of static resource zip files.

share|improve this question
2  
I dont think we can zip all in a single file .the main identifier is the name of the static resource .This means we may need separate file names and hence separate static resources for each scenario –  Mohith Kumar Jan 15 '13 at 11:27
add comment

1 Answer

AFAIK its still missing - see unimplemented idea "Apex system delivered class for ZIP file access" http://success.salesforce.com/ideaView?id=087300000007RhvAAE.

share|improve this answer
    
Thanks but I think for testing purpose a method like multimock.setStaticResource( 'http://api.salesforce.com/foo/bar', staticresource('Name-of-zip', 'name-of-file')); would be enough. –  Alberto Maianti Jan 15 '13 at 16:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.