diff options
| author | timberto <33670243+timberto@users.noreply.github.com> | 2023-04-18 12:34:25 +0200 |
|---|---|---|
| committer | Bob Arnson <github@bobs.org> | 2023-05-03 16:57:10 -0400 |
| commit | b695f2032801a21c47b7c871a70497b7d7ae488d (patch) | |
| tree | 6ca7a48e6b5c6808f50ed45a9175a3c597633270 /src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs | |
| parent | 7fc4154f79fd64a692b053c7fd4c1c75edd52aac (diff) | |
| download | wix-b695f2032801a21c47b7c871a70497b7d7ae488d.tar.gz wix-b695f2032801a21c47b7c871a70497b7d7ae488d.tar.bz2 wix-b695f2032801a21c47b7c871a70497b7d7ae488d.zip | |
Show correct error message when upgrade is blocked
Diffstat (limited to 'src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs')
| -rw-r--r-- | src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs index 2b6590ee..5d0b69d1 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs | |||
| @@ -11,9 +11,8 @@ namespace WixToolsetTest.CoreIntegration | |||
| 11 | 11 | ||
| 12 | public class UpgradeFixture | 12 | public class UpgradeFixture |
| 13 | { | 13 | { |
| 14 | |||
| 15 | [Fact] | 14 | [Fact] |
| 16 | public void PopulatesInstallExecuteSequenceTable() | 15 | public void FailsOnInvalidVersion() |
| 17 | { | 16 | { |
| 18 | var folder = TestData.Get(@"TestData"); | 17 | var folder = TestData.Get(@"TestData"); |
| 19 | 18 | ||
| @@ -44,5 +43,27 @@ namespace WixToolsetTest.CoreIntegration | |||
| 44 | Assert.Equal(242, result.ExitCode); | 43 | Assert.Equal(242, result.ExitCode); |
| 45 | } | 44 | } |
| 46 | } | 45 | } |
| 46 | |||
| 47 | [Fact] | ||
| 48 | public void MajorUpgradeDowngradeMessagePopulatesRowsAsExpected() | ||
| 49 | { | ||
| 50 | var folder = TestData.Get("TestData", "Upgrade"); | ||
| 51 | var build = new Builder(folder, null, new[] { folder }); | ||
| 52 | |||
| 53 | var results = build.BuildAndQuery(Build, "Upgrade", "LaunchCondition"); | ||
| 54 | WixAssert.CompareLineByLine(new[] | ||
| 55 | { | ||
| 56 | "LaunchCondition:NOT WIX_DOWNGRADE_DETECTED\tNo downgrades allowed!", | ||
| 57 | "LaunchCondition:NOT WIX_UPGRADE_DETECTED\tNo upgrades allowed!", | ||
| 58 | "Upgrade:{7AB24276-C628-43DB-9E65-A184D052909B}\t\t2.0.0\t1033\t1\t\tWIX_UPGRADE_DETECTED", | ||
| 59 | "Upgrade:{7AB24276-C628-43DB-9E65-A184D052909B}\t2.0.0\t\t1033\t2\t\tWIX_DOWNGRADE_DETECTED", | ||
| 60 | }, results); | ||
| 61 | } | ||
| 62 | |||
| 63 | private static void Build(string[] args) | ||
| 64 | { | ||
| 65 | var result = WixRunner.Execute(args); | ||
| 66 | result.AssertSuccess(); | ||
| 67 | } | ||
| 47 | } | 68 | } |
| 48 | } | 69 | } |
