diff options
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/ExtensionFixture.cs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/ExtensionFixture.cs b/src/test/WixToolsetTest.CoreIntegration/ExtensionFixture.cs index ca7ce0c0..bad7f3ef 100644 --- a/src/test/WixToolsetTest.CoreIntegration/ExtensionFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/ExtensionFixture.cs | |||
| @@ -102,6 +102,48 @@ namespace WixToolsetTest.CoreIntegration | |||
| 102 | } | 102 | } |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | [Fact] | ||
| 106 | public void CannotBuildWithMissingExtension() | ||
| 107 | { | ||
| 108 | var folder = TestData.Get(@"TestData\ExampleExtension"); | ||
| 109 | |||
| 110 | using (var fs = new DisposableFileSystem()) | ||
| 111 | { | ||
| 112 | var intermediateFolder = fs.GetFolder(); | ||
| 113 | |||
| 114 | var exception = Assert.Throws<WixException>(() => | ||
| 115 | WixRunner.Execute(new[] | ||
| 116 | { | ||
| 117 | "build", | ||
| 118 | Path.Combine(folder, "Package.wxs"), | ||
| 119 | "-ext", "ExampleExtension.DoesNotExist" | ||
| 120 | })); | ||
| 121 | |||
| 122 | Assert.StartsWith("The extension 'ExampleExtension.DoesNotExist' could not be found. Checked paths: ", exception.Message); | ||
| 123 | } | ||
| 124 | } | ||
| 125 | |||
| 126 | [Fact] | ||
| 127 | public void CannotBuildWithMissingVersionedExtension() | ||
| 128 | { | ||
| 129 | var folder = TestData.Get(@"TestData\ExampleExtension"); | ||
| 130 | |||
| 131 | using (var fs = new DisposableFileSystem()) | ||
| 132 | { | ||
| 133 | var intermediateFolder = fs.GetFolder(); | ||
| 134 | |||
| 135 | var exception = Assert.Throws<WixException>(() => | ||
| 136 | WixRunner.Execute(new[] | ||
| 137 | { | ||
| 138 | "build", | ||
| 139 | Path.Combine(folder, "Package.wxs"), | ||
| 140 | "-ext", "ExampleExtension.DoesNotExist/1.0.0" | ||
| 141 | })); | ||
| 142 | |||
| 143 | Assert.StartsWith("The extension 'ExampleExtension.DoesNotExist/1.0.0' could not be found. Checked paths: ", exception.Message); | ||
| 144 | } | ||
| 145 | } | ||
| 146 | |||
| 105 | private static void Build(string[] args) | 147 | private static void Build(string[] args) |
| 106 | { | 148 | { |
| 107 | var result = WixRunner.Execute(args) | 149 | var result = WixRunner.Execute(args) |
