I have written an Excel export class for ASP.NET
MVC using C#, worked very well thanks.
However, I am still getting up to speed with test drive development (TDD). I do realise I should have written the tests first.
The idea of Unite tests is just to test the code on its own, and I was wondering if anyone had any hints, and tips as to how to test code that is permeated with calls to the Aspose.Cells. Writing a wrapper for the code is one thing, but I seem to be making heavy weather of it.
Perhaps I am asking for too much, if it is mocked it can’t get to generate the Excel report at the end. I almost think that testing isn’t possible.
My code is quite simple. It loads in a template Workbook. Inserts rows of data into the first sheet, changing formatting for the header line, as well as formats for DateTime, Int, and Decimal. The Excel report is then streamed out at the end.]
There is a fair amount of logic mostly to do with styling, but I find that all the items are so enmeshed.
thanks,
Geoff