I have a third party framework that I'm using to write out an excel document and have the user download it.
The problem is that the user is attempting to export a large number of records, and it's throwing an OutOfMemoryException.
I'm trying to write a test to verify that this is happening in the third party framework and not in my code, but the Save method takes an HttpResponse object as one of the methods.
How can I get/mock/whatever an HttpResponse object to pass?
Example use:
excel.Save("test.xls",
OpenType.OpenInExcel,
FileType.Excel2003,
HttpContext.Current.Response);
Obviously the HttpContext.Current.Reponse doesn't work in a unit test, hence my problem.