diff options
Diffstat (limited to 'src/test/burn/WixToolsetTest.BurnE2E/OptionalUpdateRegistrationTests.cs')
-rw-r--r-- | src/test/burn/WixToolsetTest.BurnE2E/OptionalUpdateRegistrationTests.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/OptionalUpdateRegistrationTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/OptionalUpdateRegistrationTests.cs new file mode 100644 index 00000000..3731b0cc --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/OptionalUpdateRegistrationTests.cs | |||
@@ -0,0 +1,44 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolsetTest.BurnE2E | ||
4 | { | ||
5 | using WixTestTools; | ||
6 | using Xunit; | ||
7 | using Xunit.Abstractions; | ||
8 | |||
9 | public class OptionalUpdateRegistrationTests : BurnE2ETests | ||
10 | { | ||
11 | public OptionalUpdateRegistrationTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | ||
12 | |||
13 | [RuntimeFact] | ||
14 | public void BundleUpdateRegistrationIsStickyAndAccurateAcrossUpgrades() | ||
15 | { | ||
16 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | ||
17 | var packageAv2 = this.CreatePackageInstaller("PackageAv2"); | ||
18 | var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); | ||
19 | var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); | ||
20 | |||
21 | bundleAv1.Install(); | ||
22 | bundleAv1.VerifyRegisteredAndInPackageCache(); | ||
23 | var gotV1Registration = bundleAv1.TryGetUpdateRegistration(out var v1Registration); | ||
24 | |||
25 | bundleAv2.Install(); | ||
26 | bundleAv2.VerifyRegisteredAndInPackageCache(); | ||
27 | var gotV2Registration = bundleAv2.TryGetUpdateRegistration(out var v2Registration); | ||
28 | |||
29 | bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); | ||
30 | |||
31 | Assert.True(gotV1Registration, "Missing update registration after v1 install."); | ||
32 | Assert.True(gotV2Registration, "Missing update registration after v2 upgrade."); | ||
33 | |||
34 | Assert.Equal("Acme", v1Registration.Publisher); | ||
35 | Assert.Equal("Acme", v2Registration.Publisher); | ||
36 | Assert.Equal("Setup Geeks", v1Registration.PublishingGroup); | ||
37 | Assert.Equal("Setup Geeks", v2Registration.PublishingGroup); | ||
38 | Assert.Equal("~OptionalUpdateRegistrationTests", v1Registration.PackageName); | ||
39 | Assert.Equal("~OptionalUpdateRegistrationTests", v2Registration.PackageName); | ||
40 | Assert.Equal("1.0.0.0", v1Registration.PackageVersion); | ||
41 | Assert.Equal("2.0.0.0", v2Registration.PackageVersion); | ||
42 | } | ||
43 | } | ||
44 | } | ||