November 9th, 2010, 12:18 pm
I am looking to build unit tests for my excel addin using NUnit.I am using XLW .net for construction of the addin; the functions take c# native types and XLW types such as CellMatrix. I would like to test the functions that are usually used in Excel via NUnit. This necessitates building an dll that NUnit can test. Both of the two ways i tried to do this have failed:(1) add NUnit reference to the XLL project, and then test myLib.xll directly. Doesn't work as NUnit only recognises dlls, not xlls.(2) Create a new dll, which references the XLL project, and do my NUnit tests in there. I can't ge this to work as i need in myNubitTests.dll to reference xlw, in order that i can write functions that use CellMatrix etc. But i don't know where to find the relevant xlw assembly to reference, or even if this is a good idea.Anyone any experience or advice?Cheers