[wix-devs] Writing unit tests

Sean Hall r.sean.hall at gmail.com
Sat Jun 12 16:48:51 PDT 2021


Maybe it would have been different with micro repos, but in the monorepo I
think it makes sense for them to be in BurnUnitTest so that it's clear when
the real implementation gets out of sync with butil.

I don't know why they're identical. That should never happen in a real
bundle so the test probably shouldn't do it either.

I think the new butil API should allocate the string for the caller.
They're already using dutil anyway so it's natural to require the caller to
use strutil for strings.

On Thu, Jun 10, 2021 at 5:11 PM Hoover, Jacob via wix-devs <
wix-devs at lists.wixtoolset.org> wrote:

> Running into a bit of a chicken and egg scenario. I have the logic written
> to store a copy of the persisted variables in the registry, and have the
> method for butil to expose BundleGetBundleVariable.
>
> Logically you'd think I would put the tests for the new API in the
> DUtilUnitTest project, but it depends on behaviors only happening out of
> burn.  Is it sufficient to include the tests in BurnUnitTest?
> Currently I hijacked RegistrationTest::ResumeTest and added asserts for
> reading the variables with both the managed registry class as well as
> BundleGetBundleVariable.
>
> Finally, is there a reason why the unit test bundle ID's are identical to
> their upgrade codes?
>
> Thanks,
> Jacob
>
> ____________________________________________________________________
> WiX Toolset Developer Mailing List provided by FireGiant
> http://www.firegiant.com/
>



More information about the wix-devs mailing list