@@ -13,64 +13,6 @@ namespace WixToolsetTest.CoreIntegration
1313
1414 public class ModuleFixture
1515 {
16- [ Fact ]
17- public void CanBuildAndMergeModuleWithSubstitution ( )
18- {
19- var folder = TestData . Get ( @"TestData" , "Module" ) ;
20-
21- using ( var fs = new DisposableFileSystem ( ) )
22- {
23- var intermediateFolder = fs . GetFolder ( ) ;
24- var msmIntermediatePath = Path . Combine ( intermediateFolder , "msm" ) ;
25- var msmPath = Path . Combine ( msmIntermediatePath , "test.msm" ) ;
26-
27- var msiIntermediatePath = Path . Combine ( intermediateFolder , "msi" ) ;
28- var msiPath = Path . Combine ( msiIntermediatePath , "test.msi" ) ;
29-
30- // Build the MSM.
31- var result = WixRunner . Execute ( new [ ]
32- {
33- "build" ,
34- Path . Combine ( folder , "ModuleSubstitution.wxs" ) ,
35- "-intermediateFolder" , msmIntermediatePath ,
36- "-sw1079" ,
37- "-o" , msmPath
38- } ) ;
39-
40- result . AssertSuccess ( ) ;
41-
42- // Verify the MSM.
43- var rows = Query . QueryDatabase ( msmPath , new [ ] { "CustomAction" , "ModuleConfiguration" , "ModuleSubstitution" } ) ;
44- WixAssert . CompareLineByLine ( new [ ]
45- {
46- "CustomAction:setCONFIGTEST.DC68E039_E0C8_49FB_B5E6_37F9569188E5\t 51\t msmCONFIGTEST.DC68E039_E0C8_49FB_B5E6_37F9569188E5\t [msmCONFIGTEST.DC68E039_E0C8_49FB_B5E6_37F9569188E5]\t " ,
47- "ModuleConfiguration:CONFIGTEST\t 0\t \t \t \t 0\t \t \t \t " ,
48- "ModuleSubstitution:CustomAction\t setCONFIGTEST.DC68E039_E0C8_49FB_B5E6_37F9569188E5\t Target\t [=CONFIGTEST]"
49- } , rows ) ;
50-
51- // Merge the module into an MSI.
52- result = WixRunner . Execute ( new [ ]
53- {
54- "build" ,
55- Path . Combine ( folder , "MergeModuleSubstitution.wxs" ) ,
56- "-bindpath" , msmIntermediatePath ,
57- "-intermediateFolder" , msiIntermediatePath ,
58- "-o" , msiPath
59- } ) ;
60-
61- result . AssertSuccess ( ) ;
62-
63- // Verify the MSI.
64- rows = Query . QueryDatabase ( msiPath , new [ ] { "CustomAction" , "ModuleConfiguration" , "ModuleSubstitution" } ) ;
65- WixAssert . CompareLineByLine ( new [ ]
66- {
67- "CustomAction:setCONFIGTEST.DC68E039_E0C8_49FB_B5E6_37F9569188E5\t 51\t msmCONFIGTEST.DC68E039_E0C8_49FB_B5E6_37F9569188E5\t TestingTesting123\t "
68- } , rows ) ;
69-
70- result . AssertSuccess ( ) ;
71- }
72- }
73-
7416 [ Fact ]
7517 public void CanSuppressModularization ( )
7618 {
@@ -105,63 +47,5 @@ public void CanSuppressModularization()
10547 }
10648 }
10749
108- [ Fact ]
109- public void CanMergeModuleAndValidate ( )
110- {
111- var msmFolder = TestData . Get ( "TestData" , "SimpleModule" ) ;
112- var folder = TestData . Get ( "TestData" , "SimpleMerge" ) ;
113-
114- using ( var fs = new DisposableFileSystem ( ) )
115- {
116- var intermediateFolder = Path . Combine ( fs . GetFolder ( ) , "path with spaces" ) ;
117- var msiPath = Path . Combine ( intermediateFolder , "bin" , "test.msi" ) ;
118- var cabPath = Path . Combine ( intermediateFolder , "bin" , "cab1.cab" ) ;
119-
120- var msmResult = WixRunner . Execute ( new [ ]
121- {
122- "build" ,
123- Path . Combine ( msmFolder , "Module.wxs" ) ,
124- "-loc" , Path . Combine ( msmFolder , "Module.en-us.wxl" ) ,
125- "-bindpath" , Path . Combine ( msmFolder , "data" ) ,
126- "-intermediateFolder" , intermediateFolder ,
127- "-o" , Path . Combine ( intermediateFolder , "bin" , "test" , "test.msm" )
128- } ) ;
129-
130- msmResult . AssertSuccess ( ) ;
131-
132- var result = WixRunner . Execute ( new [ ]
133- {
134- "build" ,
135- Path . Combine ( folder , "Package.wxs" ) ,
136- "-loc" , Path . Combine ( folder , "Package.en-us.wxl" ) ,
137- "-bindpath" , Path . Combine ( intermediateFolder , "bin" , "test" ) ,
138- "-intermediateFolder" , intermediateFolder ,
139- "-o" , msiPath
140- } ) ;
141-
142- result . AssertSuccess ( ) ;
143-
144- var intermediate = Intermediate . Load ( Path . Combine ( intermediateFolder , "bin" , "test.wixpdb" ) ) ;
145- var section = intermediate . Sections . Single ( ) ;
146- Assert . Empty ( section . Symbols . OfType < FileSymbol > ( ) ) ;
147-
148- var data = WindowsInstallerData . Load ( Path . Combine ( intermediateFolder , "bin" , "test.wixpdb" ) ) ;
149- Assert . Empty ( data . Tables [ "File" ] . Rows ) ;
150-
151- var results = Query . QueryDatabase ( msiPath , new [ ] { "File" } ) ;
152- WixAssert . CompareLineByLine ( new [ ]
153- {
154- "File:File1.243FB739_4D05_472F_9CFB_EF6B1017B6DE\t ModuleComponent1.243FB739_4D05_472F_9CFB_EF6B1017B6DE\t file1.txt\t 17\t \t \t 512\t 1" ,
155- "File:File2.243FB739_4D05_472F_9CFB_EF6B1017B6DE\t ModuleComponent2.243FB739_4D05_472F_9CFB_EF6B1017B6DE\t file2.txt\t 17\t \t \t 512\t 2" ,
156- } , results ) ;
157-
158- var files = Query . GetCabinetFiles ( cabPath ) ;
159- WixAssert . CompareLineByLine ( new [ ]
160- {
161- "File1.243FB739_4D05_472F_9CFB_EF6B1017B6DE" ,
162- "File2.243FB739_4D05_472F_9CFB_EF6B1017B6DE"
163- } , files . Select ( f => f . Name ) . ToArray ( ) ) ;
164- }
165- }
16650 }
16751}
0 commit comments