diff options
| author | Bob Arnson <bob@joyofsetup.com> | 2018-01-08 13:12:02 -0500 |
|---|---|---|
| committer | Bob Arnson <bob@joyofsetup.com> | 2018-01-08 13:12:02 -0500 |
| commit | 301388abc7bfe230630e33bfd96ae4af43d59fb0 (patch) | |
| tree | 7c9d2d9fbe2bdb4e6f89eb305219d4d7a217f554 /src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs | |
| parent | bfd280115ae55bf0e63f5a787c0ab3a3cf8efa32 (diff) | |
| download | wix-301388abc7bfe230630e33bfd96ae4af43d59fb0.tar.gz wix-301388abc7bfe230630e33bfd96ae4af43d59fb0.tar.bz2 wix-301388abc7bfe230630e33bfd96ae4af43d59fb0.zip | |
Add failing unit test for .NET assemblies
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs b/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs index a171981a..4af7fc44 100644 --- a/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs | |||
| @@ -317,6 +317,46 @@ namespace WixToolsetTest.CoreIntegration | |||
| 317 | } | 317 | } |
| 318 | } | 318 | } |
| 319 | 319 | ||
| 320 | [Fact] | ||
| 321 | public void CanBuildWithAssembly() | ||
| 322 | { | ||
| 323 | var folder = TestData.Get(@"TestData\Assembly"); | ||
| 324 | |||
| 325 | using (var fs = new DisposableFileSystem()) | ||
| 326 | { | ||
| 327 | var baseFolder = fs.GetFolder(); | ||
| 328 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 329 | |||
| 330 | var program = new Program(); | ||
| 331 | var result = program.Run(new WixToolsetServiceProvider(), null, new[] | ||
| 332 | { | ||
| 333 | "build", | ||
| 334 | Path.Combine(folder, "Package.wxs"), | ||
| 335 | Path.Combine(folder, "PackageComponents.wxs"), | ||
| 336 | "-loc", Path.Combine(folder, "Package.en-us.wxl"), | ||
| 337 | "-bindpath", Path.Combine(folder, "data"), | ||
| 338 | "-intermediateFolder", intermediateFolder, | ||
| 339 | "-o", Path.Combine(baseFolder, @"bin\test.msi") | ||
| 340 | }); | ||
| 341 | |||
| 342 | Assert.Equal(0, result); | ||
| 343 | |||
| 344 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.msi"))); | ||
| 345 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.wixpdb"))); | ||
| 346 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\AssemblyMsiPackage\candle.exe"))); | ||
| 347 | |||
| 348 | var intermediate = Intermediate.Load(Path.Combine(baseFolder, @"bin\test.wir")); | ||
| 349 | var section = intermediate.Sections.Single(); | ||
| 350 | |||
| 351 | var wixFile = section.Tuples.OfType<WixFileTuple>().Single(); | ||
| 352 | Assert.Equal(Path.Combine(folder, @"data\candle.exe"), wixFile[WixFileTupleFields.Source].AsPath().Path); | ||
| 353 | Assert.Equal(@"candle.exe", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path); | ||
| 354 | |||
| 355 | var msiAssemblyNameTuples = section.Tuples.OfType<MsiAssemblyNameTuple>(); | ||
| 356 | Assert.NotEmpty(msiAssemblyNameTuples); | ||
| 357 | } | ||
| 358 | } | ||
| 359 | |||
| 320 | [Fact(Skip = "Not implemented yet.")] | 360 | [Fact(Skip = "Not implemented yet.")] |
| 321 | public void CanBuildInstanceTransform() | 361 | public void CanBuildInstanceTransform() |
| 322 | { | 362 | { |
