AVAggregateAssetDownloadTask mocking support

Hi all,

I would like to unit test a piece of code which has logic related to the operation of an AVAggregateAssetDownloadTask

I cannot separate concerns more than I have, so can't really go around the problem. I know I can use URLProtocol to mock data tasks, but it seems AVAssetDownloadURLSession is a bit different.

So far I have tried:

  1. To create an AVURLAsset by pointing it to a stream in my test bundle - no joy (I downloaded the streams from here: https://developer.apple.com/streaming/fps/)
  2. I can't quite figure out how to load the stream via URLProxy in a way that won't result in an error being returned by the task.

Any help would be greatly appreciated!

AVAggregateAssetDownloadTask mocking support
 
 
Q