diff options
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs')
-rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs b/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs index da1a374f..254b78f8 100644 --- a/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs | |||
@@ -6,14 +6,43 @@ namespace WixToolsetTest.CoreIntegration | |||
6 | using System.IO; | 6 | using System.IO; |
7 | using System.Linq; | 7 | using System.Linq; |
8 | using WixBuildTools.TestSupport; | 8 | using WixBuildTools.TestSupport; |
9 | using WixToolset.Core; | ||
9 | using WixToolset.Core.TestPackage; | 10 | using WixToolset.Core.TestPackage; |
10 | using WixToolset.Data; | 11 | using WixToolset.Data; |
11 | using WixToolset.Data.Tuples; | 12 | using WixToolset.Data.Tuples; |
13 | using WixToolset.Extensibility.Data; | ||
14 | using WixToolset.Extensibility.Services; | ||
12 | using Xunit; | 15 | using Xunit; |
13 | 16 | ||
14 | public class LinkerFixture | 17 | public class LinkerFixture |
15 | { | 18 | { |
16 | [Fact] | 19 | [Fact] |
20 | public void MustCompileBeforeLinking() | ||
21 | { | ||
22 | var intermediate1 = new Intermediate("TestIntermediate1", new[] { new IntermediateSection("test1", SectionType.Product, 65001) }, null); | ||
23 | var intermediate2 = new Intermediate("TestIntermediate2", new[] { new IntermediateSection("test2", SectionType.Fragment, 65001) }, null); | ||
24 | var serviceProvider = new WixToolsetServiceProvider(); | ||
25 | |||
26 | var listener = new TestMessageListener(); | ||
27 | var messaging = serviceProvider.GetService<IMessaging>(); | ||
28 | messaging.SetListener(listener); | ||
29 | |||
30 | var creator = serviceProvider.GetService<ITupleDefinitionCreator>(); | ||
31 | var context = serviceProvider.GetService<ILinkContext>(); | ||
32 | context.Extensions = Enumerable.Empty<WixToolset.Extensibility.ILinkerExtension>(); | ||
33 | context.ExtensionData = Enumerable.Empty<WixToolset.Extensibility.IExtensionData>(); | ||
34 | context.Intermediates = new[] { intermediate1, intermediate2 }; | ||
35 | context.TupleDefinitionCreator = creator; | ||
36 | |||
37 | var linker = serviceProvider.GetService<ILinker>(); | ||
38 | linker.Link(context); | ||
39 | |||
40 | Assert.Equal((int)ErrorMessages.Ids.IntermediatesMustBeCompiled, messaging.LastErrorNumber); | ||
41 | Assert.Single(listener.Messages); | ||
42 | Assert.EndsWith("TestIntermediate1, TestIntermediate2", listener.Messages[0].ToString()); | ||
43 | } | ||
44 | |||
45 | [Fact] | ||
17 | public void CanBuildWithOverridableActions() | 46 | public void CanBuildWithOverridableActions() |
18 | { | 47 | { |
19 | var folder = TestData.Get(@"TestData\OverridableActions"); | 48 | var folder = TestData.Get(@"TestData\OverridableActions"); |