Skip to content

Instantly share code, notes, and snippets.

@bclinkinbeard
Created December 14, 2010 16:36
Show Gist options
  • Save bclinkinbeard/740663 to your computer and use it in GitHub Desktop.
Save bclinkinbeard/740663 to your computer and use it in GitHub Desktop.
// someResponse.amf3 is a data file saved from Charles, ServiceCapture, etc.
// embedded in a class for easy access
[Embed( source="data/someResponse.amf3", mimeType="application/octet-stream" )]
public static const savedCallResponse:Class;
// MockDelegateHelper is a class provided by Swiz
[Inject]
public var mdh:MockDelegateHelper;
// methods in mock delegate can pull saved data and use Swiz's AMFUtil to parse it
public function fetchDistrictsAndSchools():AsyncToken
{
return mdh.createMockResult( AMFUtil.getAMF3Data( MockData.savedCallResponse ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment