It's me again :) As nobody seems to be able to answer my question, I'll try to rephrase it ...
There has to be a way to write unit tests against customs actions made with dtf. If not, stop me right here ... because if I can't, I'd have to use something else and drop dtf, which would be a shame as it seems to be the perfect solution for my needs. One possibility would be to write actual msi's as test cases but that seems to me to be a lot of effort and not very "unit" test like. (And I don't even see how to do that.) So in order to call my methods I have to create objects I can feed data into, that are then passed to my ca's. Currently the prototype of my ca's is something like [CustomAction] public static ActionResult MyCa(Session session); Is there a way to create my own class so that the ca accepts it as a "Session" object? Can I change the ca's argument to something else than Session? Interface? Generic object & casting acrobatics? It would be so easy if there where simple ISession and ICustomActionData interfaces. Any reason they (or something similar) don't exist? Thanks again, dbenzhuser ----- Ursprüngliche Nachricht ----- Von: dbenzhu...@gmx.net Gesendet: 24.11.11 12:17 Uhr An: wix-users@lists.sourceforge.net Betreff: [WiX-users] Unit tests with dtf and mockups Hi! I wrote custom actions with dtf (c#) that do some rather complicated xml manipulations/merges during installation (linq is great for that :) ). Next step would be to write unit tests for the ca's, but I'm kind of stuck there ... The ca's are split in immedeate and deferred parts and include database querries, properties, logging, passing CustomActionData etc. To run these from Nunit my plan was to write little mockups for the Session and CustomActionData classes. But how to make the ca's accept my mockups? There are (as far as I saw) no simple ISession and ICustomActionData interfaces to use. Inheriting from Session and CAD and overwriting their methods doesn't work either, because these are marked as sealed. I don't have much experience in unit tests with mockups, so perhaps I'm just going in the wrong direction, any hints appreciated! Thanks, dbenzhuser ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users