[wix-users] Unit Test Deferred Custom Actions
Jacob.Hoover at greenheck.com
Tue Mar 20 08:18:24 PDT 2018
Best bet would be to refactor your CA code to do all the MSI specific stuff (Session, etc) in one method, that would then pass the values in as var's to a function that doesn't require any MSI specific objects. You could then run your unit against the non-msi methods.
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Jon Earle via wix-users
Sent: Tuesday, March 20, 2018 10:05 AM
To: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
Cc: Jon Earle <earlej at hotmail.com>
Subject: [wix-users] Unit Test Deferred Custom Actions
We have a few custom actions, set as deferred, which perform various things (create files, install or cleanup certificates, selectively update config files, etc).
I would like to write some unit tests for those. Problem is, how do I deal with the Session object? It does not appear to be instantiable... so, short of refactoring my CA code, how can I create a mocked up version of this that I can update and pass to my CAs?
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users