diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/burn/WixTestTools/GenericArpRegistration.cs | 4 | ||||
-rw-r--r-- | src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/test/burn/WixTestTools/GenericArpRegistration.cs b/src/test/burn/WixTestTools/GenericArpRegistration.cs index d87c4feb..dfddd9a3 100644 --- a/src/test/burn/WixTestTools/GenericArpRegistration.cs +++ b/src/test/burn/WixTestTools/GenericArpRegistration.cs | |||
@@ -15,6 +15,7 @@ namespace WixTestTools | |||
15 | public const string REGISTRY_ARP_DISPLAY_NAME = "DisplayName"; | 15 | public const string REGISTRY_ARP_DISPLAY_NAME = "DisplayName"; |
16 | public const string REGISTRY_ARP_DISPLAY_VERSION = "DisplayVersion"; | 16 | public const string REGISTRY_ARP_DISPLAY_VERSION = "DisplayVersion"; |
17 | public const string REGISTRY_ARP_ESTIMATED_SIZE = "EstimatedSize"; | 17 | public const string REGISTRY_ARP_ESTIMATED_SIZE = "EstimatedSize"; |
18 | public const string REGISTRY_ARP_INSTALL_DATE = "InstallDate"; | ||
18 | public const string REGISTRY_ARP_PUBLISHER = "Publisher"; | 19 | public const string REGISTRY_ARP_PUBLISHER = "Publisher"; |
19 | public const string REGISTRY_ARP_HELP_LINK = "HelpLink"; | 20 | public const string REGISTRY_ARP_HELP_LINK = "HelpLink"; |
20 | public const string REGISTRY_ARP_HELP_TELEPHONE = "HelpTelephone"; | 21 | public const string REGISTRY_ARP_HELP_TELEPHONE = "HelpTelephone"; |
@@ -42,6 +43,8 @@ namespace WixTestTools | |||
42 | 43 | ||
43 | public int? EstimatedSize { get; set; } | 44 | public int? EstimatedSize { get; set; } |
44 | 45 | ||
46 | public string InstallDate { get; set; } | ||
47 | |||
45 | public int? Installed { get; set; } | 48 | public int? Installed { get; set; } |
46 | 49 | ||
47 | public string ModifyPath { get; set; } | 50 | public string ModifyPath { get; set; } |
@@ -103,6 +106,7 @@ namespace WixTestTools | |||
103 | registration.DisplayName = idKey.GetValue(REGISTRY_ARP_DISPLAY_NAME) as string; | 106 | registration.DisplayName = idKey.GetValue(REGISTRY_ARP_DISPLAY_NAME) as string; |
104 | registration.DisplayVersion = idKey.GetValue(REGISTRY_ARP_DISPLAY_VERSION) as string; | 107 | registration.DisplayVersion = idKey.GetValue(REGISTRY_ARP_DISPLAY_VERSION) as string; |
105 | registration.EstimatedSize = idKey.GetValue(REGISTRY_ARP_ESTIMATED_SIZE) as int?; | 108 | registration.EstimatedSize = idKey.GetValue(REGISTRY_ARP_ESTIMATED_SIZE) as int?; |
109 | registration.InstallDate = idKey.GetValue(REGISTRY_ARP_INSTALL_DATE) as string; | ||
106 | registration.Installed = idKey.GetValue(REGISTRY_ARP_INSTALLED) as int?; | 110 | registration.Installed = idKey.GetValue(REGISTRY_ARP_INSTALLED) as int?; |
107 | registration.ModifyPath = idKey.GetValue(REGISTRY_ARP_MODIFY_PATH) as string; | 111 | registration.ModifyPath = idKey.GetValue(REGISTRY_ARP_MODIFY_PATH) as string; |
108 | registration.Publisher = idKey.GetValue(REGISTRY_ARP_PUBLISHER) as string; | 112 | registration.Publisher = idKey.GetValue(REGISTRY_ARP_PUBLISHER) as string; |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs index b45ec83a..d9eb36ba 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs | |||
@@ -25,7 +25,12 @@ namespace WixToolsetTest.BurnE2E | |||
25 | bundleA.Install(); | 25 | bundleA.Install(); |
26 | var initialRegistration = bundleA.VerifyRegisteredAndInPackageCache(); | 26 | var initialRegistration = bundleA.VerifyRegisteredAndInPackageCache(); |
27 | 27 | ||
28 | var now = DateTime.Now; | ||
29 | var today = now.ToString("yyyyMMdd"); | ||
30 | var yesterday = now.AddDays(-1).ToString("yyyyMMdd"); // check yesterday in case the bundle install crossed the midnight hour. | ||
31 | |||
28 | Assert.NotNull(initialRegistration.EstimatedSize); | 32 | Assert.NotNull(initialRegistration.EstimatedSize); |
33 | Assert.True(initialRegistration.InstallDate == today || initialRegistration.InstallDate == yesterday, $"Installed date should have been {today} or {yesterday}"); | ||
29 | 34 | ||
30 | testBAController.SetForceKeepRegistration(null); | 35 | testBAController.SetForceKeepRegistration(null); |
31 | testBAController.ResetPackageStates("PackageA"); | 36 | testBAController.ResetPackageStates("PackageA"); |
@@ -36,6 +41,8 @@ namespace WixToolsetTest.BurnE2E | |||
36 | // Verifies https://github.com/wixtoolset/issues/issues/4039 | 41 | // Verifies https://github.com/wixtoolset/issues/issues/4039 |
37 | Assert.NotNull(finalRegistration.EstimatedSize); | 42 | Assert.NotNull(finalRegistration.EstimatedSize); |
38 | Assert.InRange(finalRegistration.EstimatedSize.Value, initialRegistration.EstimatedSize.Value + 1, Int32.MaxValue); | 43 | Assert.InRange(finalRegistration.EstimatedSize.Value, initialRegistration.EstimatedSize.Value + 1, Int32.MaxValue); |
44 | |||
45 | Assert.Equal(initialRegistration.InstallDate, finalRegistration.InstallDate); | ||
39 | } | 46 | } |
40 | 47 | ||
41 | [RuntimeFact] | 48 | [RuntimeFact] |