diff options
Diffstat (limited to 'src')
14 files changed, 77 insertions, 55 deletions
diff --git a/src/WixToolset.Converters.Symbolizer/ConvertSymbols.cs b/src/WixToolset.Converters.Symbolizer/ConvertSymbols.cs index ca75d3c2..4fb891f9 100644 --- a/src/WixToolset.Converters.Symbolizer/ConvertSymbols.cs +++ b/src/WixToolset.Converters.Symbolizer/ConvertSymbols.cs | |||
@@ -315,7 +315,7 @@ namespace WixToolset.Converters.Symbolizer | |||
315 | Section = FieldAsString(row, 3), | 315 | Section = FieldAsString(row, 3), |
316 | Key = FieldAsString(row, 4), | 316 | Key = FieldAsString(row, 4), |
317 | Value = FieldAsString(row, 5), | 317 | Value = FieldAsString(row, 5), |
318 | Action = action == 3 ? InifFileActionType.AddTag : action == 1 ? InifFileActionType.CreateLine : InifFileActionType.AddLine, | 318 | Action = action == 3 ? IniFileActionType.AddTag : action == 1 ? IniFileActionType.CreateLine : IniFileActionType.AddLine, |
319 | ComponentRef = FieldAsString(row, 7), | 319 | ComponentRef = FieldAsString(row, 7), |
320 | }; | 320 | }; |
321 | 321 | ||
diff --git a/src/WixToolset.Converters/ConvertCommand.cs b/src/WixToolset.Converters/ConvertCommand.cs index 50ca7249..e29b176e 100644 --- a/src/WixToolset.Converters/ConvertCommand.cs +++ b/src/WixToolset.Converters/ConvertCommand.cs | |||
@@ -26,10 +26,10 @@ namespace WixToolset.Converters | |||
26 | return Task.FromResult(-1); | 26 | return Task.FromResult(-1); |
27 | } | 27 | } |
28 | 28 | ||
29 | var converter = new WixConverter(this.Messaging, this.IndentationAmount, this.ErrorsAsWarnings, this.IgnoreErrors); | ||
30 | |||
31 | this.ParseSettings(SettingsFileDefault); | 29 | this.ParseSettings(SettingsFileDefault); |
32 | 30 | ||
31 | var converter = new WixConverter(this.Messaging, this.IndentationAmount, this.ErrorsAsWarnings, this.IgnoreErrors); | ||
32 | |||
33 | var errors = base.Inspect(Inspector, cancellationToken); | 33 | var errors = base.Inspect(Inspector, cancellationToken); |
34 | 34 | ||
35 | return Task.FromResult(errors); | 35 | return Task.FromResult(errors); |
diff --git a/src/WixToolset.Converters/WixConverter.cs b/src/WixToolset.Converters/WixConverter.cs index f10875f1..5f6ee2df 100644 --- a/src/WixToolset.Converters/WixConverter.cs +++ b/src/WixToolset.Converters/WixConverter.cs | |||
@@ -237,16 +237,13 @@ namespace WixToolset.Converters | |||
237 | this.Operation = ConvertOperation.Convert; | 237 | this.Operation = ConvertOperation.Convert; |
238 | 238 | ||
239 | // Remove the declaration. | 239 | // Remove the declaration. |
240 | if (null != document.Declaration) | 240 | if (null != document.Declaration |
241 | && this.OnError(ConverterTestType.DeclarationPresent, null, "This file contains an XML declaration on the first line.")) | ||
241 | { | 242 | { |
242 | if (this.OnError(ConverterTestType.DeclarationPresent, null, "This file contains an XML declaration on the first line.")) | 243 | document.Declaration = null; |
243 | { | 244 | TrimLeadingText(document); |
244 | document.Declaration = null; | ||
245 | } | ||
246 | } | 245 | } |
247 | 246 | ||
248 | TrimLeadingText(document); | ||
249 | |||
250 | // Start converting the nodes at the top. | 247 | // Start converting the nodes at the top. |
251 | this.ConvertNodes(document.Nodes(), 0); | 248 | this.ConvertNodes(document.Nodes(), 0); |
252 | 249 | ||
@@ -292,16 +289,13 @@ namespace WixToolset.Converters | |||
292 | this.Operation = ConvertOperation.Format; | 289 | this.Operation = ConvertOperation.Format; |
293 | 290 | ||
294 | // Remove the declaration. | 291 | // Remove the declaration. |
295 | if (null != document.Declaration) | 292 | if (null != document.Declaration |
293 | && this.OnError(ConverterTestType.DeclarationPresent, null, "This file contains an XML declaration on the first line.")) | ||
296 | { | 294 | { |
297 | if (this.OnError(ConverterTestType.DeclarationPresent, null, "This file contains an XML declaration on the first line.")) | 295 | document.Declaration = null; |
298 | { | 296 | TrimLeadingText(document); |
299 | document.Declaration = null; | ||
300 | } | ||
301 | } | 297 | } |
302 | 298 | ||
303 | TrimLeadingText(document); | ||
304 | |||
305 | // Start converting the nodes at the top. | 299 | // Start converting the nodes at the top. |
306 | this.ConvertNodes(document.Nodes(), 0); | 300 | this.ConvertNodes(document.Nodes(), 0); |
307 | 301 | ||
@@ -326,9 +320,11 @@ namespace WixToolset.Converters | |||
326 | 320 | ||
327 | private void SaveDocument(XDocument document) | 321 | private void SaveDocument(XDocument document) |
328 | { | 322 | { |
323 | var ignoreDeclarationError = this.IgnoreErrors.Contains(ConverterTestType.DeclarationPresent); | ||
324 | |||
329 | try | 325 | try |
330 | { | 326 | { |
331 | using (var writer = XmlWriter.Create(this.SourceFile, new XmlWriterSettings { OmitXmlDeclaration = true })) | 327 | using (var writer = XmlWriter.Create(this.SourceFile, new XmlWriterSettings { OmitXmlDeclaration = !ignoreDeclarationError })) |
332 | { | 328 | { |
333 | document.Save(writer); | 329 | document.Save(writer); |
334 | } | 330 | } |
diff --git a/src/test/WixToolsetTest.Converters/BaseConverterFixture.cs b/src/test/WixToolsetTest.Converters/BaseConverterFixture.cs index 2cd4119b..2421d73b 100644 --- a/src/test/WixToolsetTest.Converters/BaseConverterFixture.cs +++ b/src/test/WixToolsetTest.Converters/BaseConverterFixture.cs | |||
@@ -11,12 +11,12 @@ namespace WixToolsetTest.Converters | |||
11 | 11 | ||
12 | public abstract class BaseConverterFixture | 12 | public abstract class BaseConverterFixture |
13 | { | 13 | { |
14 | protected static string UnformattedDocumentString(XDocument document) | 14 | protected static string UnformattedDocumentString(XDocument document, bool omitXmlDeclaration = true) |
15 | { | 15 | { |
16 | var sb = new StringBuilder(); | 16 | var sb = new StringBuilder(); |
17 | 17 | ||
18 | using (var writer = new StringWriter(sb)) | 18 | using (var writer = new StringWriter(sb)) |
19 | using (var xml = XmlWriter.Create(writer, new XmlWriterSettings { OmitXmlDeclaration = true })) | 19 | using (var xml = XmlWriter.Create(writer, new XmlWriterSettings { OmitXmlDeclaration = omitXmlDeclaration })) |
20 | { | 20 | { |
21 | document.Save(xml); | 21 | document.Save(xml); |
22 | } | 22 | } |
@@ -24,20 +24,10 @@ namespace WixToolsetTest.Converters | |||
24 | return sb.ToString().TrimStart(); | 24 | return sb.ToString().TrimStart(); |
25 | } | 25 | } |
26 | 26 | ||
27 | protected static string[] UnformattedDocumentLines(XDocument document) | 27 | protected static string[] UnformattedDocumentLines(XDocument document, bool omitXmlDeclaration = true) |
28 | { | 28 | { |
29 | var unformatted = UnformattedDocumentString(document); | 29 | var unformatted = UnformattedDocumentString(document, omitXmlDeclaration); |
30 | return unformatted.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); | 30 | return unformatted.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); |
31 | } | 31 | } |
32 | |||
33 | protected static void CompareLineByLine(string[] expectedLines, string[] actualLines) | ||
34 | { | ||
35 | for (var i = 0; i < expectedLines.Length; ++i) | ||
36 | { | ||
37 | Assert.True(actualLines.Length > i, $"{i}: Expected file longer than actual file"); | ||
38 | Assert.Equal($"{i}: {expectedLines[i]}", $"{i}: {actualLines[i]}"); | ||
39 | } | ||
40 | Assert.True(expectedLines.Length == actualLines.Length, "Actual file longer than expected file"); | ||
41 | } | ||
42 | } | 32 | } |
43 | } | 33 | } |
diff --git a/src/test/WixToolsetTest.Converters/BootstrapperApplicationFixture.cs b/src/test/WixToolsetTest.Converters/BootstrapperApplicationFixture.cs index 1551077b..68a8afc8 100644 --- a/src/test/WixToolsetTest.Converters/BootstrapperApplicationFixture.cs +++ b/src/test/WixToolsetTest.Converters/BootstrapperApplicationFixture.cs | |||
@@ -39,7 +39,7 @@ namespace WixToolsetTest.Converters | |||
39 | Assert.Equal(2, errors); | 39 | Assert.Equal(2, errors); |
40 | 40 | ||
41 | var actualLines = UnformattedDocumentLines(document); | 41 | var actualLines = UnformattedDocumentLines(document); |
42 | CompareLineByLine(expected, actualLines); | 42 | WixAssert.CompareLineByLine(expected, actualLines); |
43 | } | 43 | } |
44 | 44 | ||
45 | [Fact] | 45 | [Fact] |
@@ -70,7 +70,7 @@ namespace WixToolsetTest.Converters | |||
70 | Assert.Equal(0, errors); | 70 | Assert.Equal(0, errors); |
71 | 71 | ||
72 | var actualLines = UnformattedDocumentLines(document); | 72 | var actualLines = UnformattedDocumentLines(document); |
73 | CompareLineByLine(expected, actualLines); | 73 | WixAssert.CompareLineByLine(expected, actualLines); |
74 | } | 74 | } |
75 | } | 75 | } |
76 | } | 76 | } |
diff --git a/src/test/WixToolsetTest.Converters/ConditionFixture.cs b/src/test/WixToolsetTest.Converters/ConditionFixture.cs index d8e5b392..65fa6734 100644 --- a/src/test/WixToolsetTest.Converters/ConditionFixture.cs +++ b/src/test/WixToolsetTest.Converters/ConditionFixture.cs | |||
@@ -4,6 +4,7 @@ namespace WixToolsetTest.Converters | |||
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Xml.Linq; | 6 | using System.Xml.Linq; |
7 | using WixBuildTools.TestSupport; | ||
7 | using WixToolset.Converters; | 8 | using WixToolset.Converters; |
8 | using WixToolsetTest.Converters.Mocks; | 9 | using WixToolsetTest.Converters.Mocks; |
9 | using Xunit; | 10 | using Xunit; |
@@ -53,7 +54,7 @@ namespace WixToolsetTest.Converters | |||
53 | Assert.Equal(4, errors); | 54 | Assert.Equal(4, errors); |
54 | 55 | ||
55 | var actualLines = UnformattedDocumentLines(document); | 56 | var actualLines = UnformattedDocumentLines(document); |
56 | CompareLineByLine(expected, actualLines); | 57 | WixAssert.CompareLineByLine(expected, actualLines); |
57 | } | 58 | } |
58 | 59 | ||
59 | [Fact] | 60 | [Fact] |
@@ -99,7 +100,7 @@ namespace WixToolsetTest.Converters | |||
99 | Assert.Equal(5, errors); | 100 | Assert.Equal(5, errors); |
100 | 101 | ||
101 | var actualLines = UnformattedDocumentLines(document); | 102 | var actualLines = UnformattedDocumentLines(document); |
102 | CompareLineByLine(expected, actualLines); | 103 | WixAssert.CompareLineByLine(expected, actualLines); |
103 | } | 104 | } |
104 | 105 | ||
105 | [Fact] | 106 | [Fact] |
@@ -135,7 +136,7 @@ namespace WixToolsetTest.Converters | |||
135 | Assert.Equal(3, errors); | 136 | Assert.Equal(3, errors); |
136 | 137 | ||
137 | var actualLines = UnformattedDocumentLines(document); | 138 | var actualLines = UnformattedDocumentLines(document); |
138 | CompareLineByLine(expected, actualLines); | 139 | WixAssert.CompareLineByLine(expected, actualLines); |
139 | } | 140 | } |
140 | 141 | ||
141 | [Fact] | 142 | [Fact] |
@@ -171,7 +172,7 @@ namespace WixToolsetTest.Converters | |||
171 | Assert.Equal(3, errors); | 172 | Assert.Equal(3, errors); |
172 | 173 | ||
173 | var actualLines = UnformattedDocumentLines(document); | 174 | var actualLines = UnformattedDocumentLines(document); |
174 | CompareLineByLine(expected, actualLines); | 175 | WixAssert.CompareLineByLine(expected, actualLines); |
175 | } | 176 | } |
176 | 177 | ||
177 | [Fact] | 178 | [Fact] |
@@ -209,7 +210,7 @@ namespace WixToolsetTest.Converters | |||
209 | Assert.Equal(4, errors); | 210 | Assert.Equal(4, errors); |
210 | 211 | ||
211 | var actualLines = UnformattedDocumentLines(document); | 212 | var actualLines = UnformattedDocumentLines(document); |
212 | CompareLineByLine(expected, actualLines); | 213 | WixAssert.CompareLineByLine(expected, actualLines); |
213 | } | 214 | } |
214 | 215 | ||
215 | [Fact] | 216 | [Fact] |
@@ -250,7 +251,7 @@ namespace WixToolsetTest.Converters | |||
250 | Assert.Equal(3, errors); | 251 | Assert.Equal(3, errors); |
251 | 252 | ||
252 | var actualLines = UnformattedDocumentLines(document); | 253 | var actualLines = UnformattedDocumentLines(document); |
253 | CompareLineByLine(expected, actualLines); | 254 | WixAssert.CompareLineByLine(expected, actualLines); |
254 | } | 255 | } |
255 | } | 256 | } |
256 | } | 257 | } |
diff --git a/src/test/WixToolsetTest.Converters/ConverterFixture.cs b/src/test/WixToolsetTest.Converters/ConverterFixture.cs index cf89ba7e..29f34412 100644 --- a/src/test/WixToolsetTest.Converters/ConverterFixture.cs +++ b/src/test/WixToolsetTest.Converters/ConverterFixture.cs | |||
@@ -40,6 +40,34 @@ namespace WixToolsetTest.Converters | |||
40 | } | 40 | } |
41 | 41 | ||
42 | [Fact] | 42 | [Fact] |
43 | public void EnsuresDeclarationWhenIgnored() | ||
44 | { | ||
45 | var parse = String.Join(Environment.NewLine, | ||
46 | "<?xml version='1.0' encoding='utf-16'?>", | ||
47 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", | ||
48 | " <Fragment />", | ||
49 | "</Wix>"); | ||
50 | |||
51 | var expected = String.Join(Environment.NewLine, | ||
52 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
53 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | ||
54 | " <Fragment />", | ||
55 | "</Wix>"); | ||
56 | |||
57 | var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); | ||
58 | |||
59 | var messaging = new MockMessaging(); | ||
60 | var converter = new WixConverter(messaging, 2, ignoreErrors: new[] { "DeclarationPresent" } ); | ||
61 | |||
62 | var errors = converter.ConvertDocument(document); | ||
63 | |||
64 | var actual = UnformattedDocumentString(document, omitXmlDeclaration: false); | ||
65 | |||
66 | Assert.Equal(0, errors); | ||
67 | Assert.Equal(expected, actual); | ||
68 | } | ||
69 | |||
70 | [Fact] | ||
43 | public void CanConvertMainNamespace() | 71 | public void CanConvertMainNamespace() |
44 | { | 72 | { |
45 | var parse = String.Join(Environment.NewLine, | 73 | var parse = String.Join(Environment.NewLine, |
diff --git a/src/test/WixToolsetTest.Converters/CustomTableFixture.cs b/src/test/WixToolsetTest.Converters/CustomTableFixture.cs index 4470a2ff..c51d1923 100644 --- a/src/test/WixToolsetTest.Converters/CustomTableFixture.cs +++ b/src/test/WixToolsetTest.Converters/CustomTableFixture.cs | |||
@@ -4,6 +4,7 @@ namespace WixToolsetTest.Converters | |||
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Xml.Linq; | 6 | using System.Xml.Linq; |
7 | using WixBuildTools.TestSupport; | ||
7 | using WixToolset.Converters; | 8 | using WixToolset.Converters; |
8 | using WixToolsetTest.Converters.Mocks; | 9 | using WixToolsetTest.Converters.Mocks; |
9 | using Xunit; | 10 | using Xunit; |
@@ -43,7 +44,7 @@ namespace WixToolsetTest.Converters | |||
43 | Assert.Equal(4, errors); | 44 | Assert.Equal(4, errors); |
44 | 45 | ||
45 | var actualLines = UnformattedDocumentLines(document); | 46 | var actualLines = UnformattedDocumentLines(document); |
46 | CompareLineByLine(expected, actualLines); | 47 | WixAssert.CompareLineByLine(expected, actualLines); |
47 | } | 48 | } |
48 | 49 | ||
49 | [Fact] | 50 | [Fact] |
@@ -85,7 +86,7 @@ namespace WixToolsetTest.Converters | |||
85 | Assert.Equal(3, errors); | 86 | Assert.Equal(3, errors); |
86 | 87 | ||
87 | var actualLines = UnformattedDocumentLines(document); | 88 | var actualLines = UnformattedDocumentLines(document); |
88 | CompareLineByLine(expected, actualLines); | 89 | WixAssert.CompareLineByLine(expected, actualLines); |
89 | } | 90 | } |
90 | 91 | ||
91 | [Fact] | 92 | [Fact] |
@@ -128,7 +129,7 @@ namespace WixToolsetTest.Converters | |||
128 | Assert.Equal(2, errors); | 129 | Assert.Equal(2, errors); |
129 | 130 | ||
130 | var actualLines = UnformattedDocumentLines(document); | 131 | var actualLines = UnformattedDocumentLines(document); |
131 | CompareLineByLine(expected, actualLines); | 132 | WixAssert.CompareLineByLine(expected, actualLines); |
132 | } | 133 | } |
133 | 134 | ||
134 | [Fact] | 135 | [Fact] |
@@ -164,7 +165,7 @@ namespace WixToolsetTest.Converters | |||
164 | Assert.Equal(2, errors); | 165 | Assert.Equal(2, errors); |
165 | 166 | ||
166 | var actualLines = UnformattedDocumentLines(document); | 167 | var actualLines = UnformattedDocumentLines(document); |
167 | CompareLineByLine(expected, actualLines); | 168 | WixAssert.CompareLineByLine(expected, actualLines); |
168 | } | 169 | } |
169 | 170 | ||
170 | [Fact] | 171 | [Fact] |
diff --git a/src/test/WixToolsetTest.Converters/FeatureFixture.cs b/src/test/WixToolsetTest.Converters/FeatureFixture.cs index 8240945d..1df94a81 100644 --- a/src/test/WixToolsetTest.Converters/FeatureFixture.cs +++ b/src/test/WixToolsetTest.Converters/FeatureFixture.cs | |||
@@ -4,6 +4,7 @@ namespace WixToolsetTest.Converters | |||
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Xml.Linq; | 6 | using System.Xml.Linq; |
7 | using WixBuildTools.TestSupport; | ||
7 | using WixToolset.Converters; | 8 | using WixToolset.Converters; |
8 | using WixToolsetTest.Converters.Mocks; | 9 | using WixToolsetTest.Converters.Mocks; |
9 | using Xunit; | 10 | using Xunit; |
@@ -39,7 +40,7 @@ namespace WixToolsetTest.Converters | |||
39 | Assert.Equal(4, errors); | 40 | Assert.Equal(4, errors); |
40 | 41 | ||
41 | var actualLines = UnformattedDocumentLines(document); | 42 | var actualLines = UnformattedDocumentLines(document); |
42 | CompareLineByLine(expected, actualLines); | 43 | WixAssert.CompareLineByLine(expected, actualLines); |
43 | } | 44 | } |
44 | 45 | ||
45 | [Fact] | 46 | [Fact] |
@@ -71,7 +72,7 @@ namespace WixToolsetTest.Converters | |||
71 | Assert.Equal(3, errors); | 72 | Assert.Equal(3, errors); |
72 | 73 | ||
73 | var actualLines = UnformattedDocumentLines(document); | 74 | var actualLines = UnformattedDocumentLines(document); |
74 | CompareLineByLine(expected, actualLines); | 75 | WixAssert.CompareLineByLine(expected, actualLines); |
75 | } | 76 | } |
76 | 77 | ||
77 | [Fact] | 78 | [Fact] |
@@ -103,7 +104,7 @@ namespace WixToolsetTest.Converters | |||
103 | Assert.Equal(3, errors); | 104 | Assert.Equal(3, errors); |
104 | 105 | ||
105 | var actualLines = UnformattedDocumentLines(document); | 106 | var actualLines = UnformattedDocumentLines(document); |
106 | CompareLineByLine(expected, actualLines); | 107 | WixAssert.CompareLineByLine(expected, actualLines); |
107 | } | 108 | } |
108 | } | 109 | } |
109 | } | 110 | } |
diff --git a/src/test/WixToolsetTest.Converters/FirewallExtensionFixture.cs b/src/test/WixToolsetTest.Converters/FirewallExtensionFixture.cs index 72571cd8..e6ec8568 100644 --- a/src/test/WixToolsetTest.Converters/FirewallExtensionFixture.cs +++ b/src/test/WixToolsetTest.Converters/FirewallExtensionFixture.cs | |||
@@ -4,6 +4,7 @@ namespace WixToolsetTest.Converters | |||
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Xml.Linq; | 6 | using System.Xml.Linq; |
7 | using WixBuildTools.TestSupport; | ||
7 | using WixToolset.Converters; | 8 | using WixToolset.Converters; |
8 | using WixToolsetTest.Converters.Mocks; | 9 | using WixToolsetTest.Converters.Mocks; |
9 | using Xunit; | 10 | using Xunit; |
@@ -40,7 +41,7 @@ namespace WixToolsetTest.Converters | |||
40 | Assert.Equal(3, errors); | 41 | Assert.Equal(3, errors); |
41 | 42 | ||
42 | var actualLines = UnformattedDocumentLines(document); | 43 | var actualLines = UnformattedDocumentLines(document); |
43 | CompareLineByLine(expected, actualLines); | 44 | WixAssert.CompareLineByLine(expected, actualLines); |
44 | } | 45 | } |
45 | 46 | ||
46 | [Fact] | 47 | [Fact] |
@@ -73,7 +74,7 @@ namespace WixToolsetTest.Converters | |||
73 | Assert.Equal(3, errors); | 74 | Assert.Equal(3, errors); |
74 | 75 | ||
75 | var actualLines = UnformattedDocumentLines(document); | 76 | var actualLines = UnformattedDocumentLines(document); |
76 | CompareLineByLine(expected, actualLines); | 77 | WixAssert.CompareLineByLine(expected, actualLines); |
77 | } | 78 | } |
78 | } | 79 | } |
79 | } | 80 | } |
diff --git a/src/test/WixToolsetTest.Converters/IncludeFixture.cs b/src/test/WixToolsetTest.Converters/IncludeFixture.cs index 7be2c030..2fd8244f 100644 --- a/src/test/WixToolsetTest.Converters/IncludeFixture.cs +++ b/src/test/WixToolsetTest.Converters/IncludeFixture.cs | |||
@@ -4,6 +4,7 @@ namespace WixToolsetTest.Converters | |||
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Xml.Linq; | 6 | using System.Xml.Linq; |
7 | using WixBuildTools.TestSupport; | ||
7 | using WixToolset.Converters; | 8 | using WixToolset.Converters; |
8 | using WixToolsetTest.Converters.Mocks; | 9 | using WixToolsetTest.Converters.Mocks; |
9 | using Xunit; | 10 | using Xunit; |
@@ -34,7 +35,7 @@ namespace WixToolsetTest.Converters | |||
34 | Assert.Equal(1, errors); | 35 | Assert.Equal(1, errors); |
35 | 36 | ||
36 | var actualLines = UnformattedDocumentLines(document); | 37 | var actualLines = UnformattedDocumentLines(document); |
37 | CompareLineByLine(expected, actualLines); | 38 | WixAssert.CompareLineByLine(expected, actualLines); |
38 | } | 39 | } |
39 | 40 | ||
40 | [Fact] | 41 | [Fact] |
@@ -61,7 +62,7 @@ namespace WixToolsetTest.Converters | |||
61 | Assert.Equal(1, errors); | 62 | Assert.Equal(1, errors); |
62 | 63 | ||
63 | var actualLines = UnformattedDocumentLines(document); | 64 | var actualLines = UnformattedDocumentLines(document); |
64 | CompareLineByLine(expected, actualLines); | 65 | WixAssert.CompareLineByLine(expected, actualLines); |
65 | } | 66 | } |
66 | } | 67 | } |
67 | } | 68 | } |
diff --git a/src/test/WixToolsetTest.Converters/SequenceFixture.cs b/src/test/WixToolsetTest.Converters/SequenceFixture.cs index 2fbc4d4a..ec6c709b 100644 --- a/src/test/WixToolsetTest.Converters/SequenceFixture.cs +++ b/src/test/WixToolsetTest.Converters/SequenceFixture.cs | |||
@@ -4,6 +4,7 @@ namespace WixToolsetTest.Converters | |||
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Xml.Linq; | 6 | using System.Xml.Linq; |
7 | using WixBuildTools.TestSupport; | ||
7 | using WixToolset.Converters; | 8 | using WixToolset.Converters; |
8 | using WixToolsetTest.Converters.Mocks; | 9 | using WixToolsetTest.Converters.Mocks; |
9 | using Xunit; | 10 | using Xunit; |
@@ -42,7 +43,7 @@ namespace WixToolsetTest.Converters | |||
42 | Assert.Equal(2, errors); | 43 | Assert.Equal(2, errors); |
43 | 44 | ||
44 | var actualLines = UnformattedDocumentLines(document); | 45 | var actualLines = UnformattedDocumentLines(document); |
45 | CompareLineByLine(expected, actualLines); | 46 | WixAssert.CompareLineByLine(expected, actualLines); |
46 | } | 47 | } |
47 | } | 48 | } |
48 | } | 49 | } |
diff --git a/src/test/WixToolsetTest.Converters/UtilExtensionFixture.cs b/src/test/WixToolsetTest.Converters/UtilExtensionFixture.cs index d9c58160..9d55af79 100644 --- a/src/test/WixToolsetTest.Converters/UtilExtensionFixture.cs +++ b/src/test/WixToolsetTest.Converters/UtilExtensionFixture.cs | |||
@@ -4,6 +4,7 @@ namespace WixToolsetTest.Converters | |||
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Xml.Linq; | 6 | using System.Xml.Linq; |
7 | using WixBuildTools.TestSupport; | ||
7 | using WixToolset.Converters; | 8 | using WixToolset.Converters; |
8 | using WixToolsetTest.Converters.Mocks; | 9 | using WixToolsetTest.Converters.Mocks; |
9 | using Xunit; | 10 | using Xunit; |
@@ -40,7 +41,7 @@ namespace WixToolsetTest.Converters | |||
40 | Assert.Equal(3, errors); | 41 | Assert.Equal(3, errors); |
41 | 42 | ||
42 | var actualLines = UnformattedDocumentLines(document); | 43 | var actualLines = UnformattedDocumentLines(document); |
43 | CompareLineByLine(expected, actualLines); | 44 | WixAssert.CompareLineByLine(expected, actualLines); |
44 | } | 45 | } |
45 | 46 | ||
46 | [Fact] | 47 | [Fact] |
@@ -73,7 +74,7 @@ namespace WixToolsetTest.Converters | |||
73 | Assert.Equal(3, errors); | 74 | Assert.Equal(3, errors); |
74 | 75 | ||
75 | var actualLines = UnformattedDocumentLines(document); | 76 | var actualLines = UnformattedDocumentLines(document); |
76 | CompareLineByLine(expected, actualLines); | 77 | WixAssert.CompareLineByLine(expected, actualLines); |
77 | } | 78 | } |
78 | } | 79 | } |
79 | } | 80 | } |
diff --git a/src/test/WixToolsetTest.Converters/Wix4ConversionFixture.cs b/src/test/WixToolsetTest.Converters/Wix4ConversionFixture.cs index a3f2adc8..16a68895 100644 --- a/src/test/WixToolsetTest.Converters/Wix4ConversionFixture.cs +++ b/src/test/WixToolsetTest.Converters/Wix4ConversionFixture.cs | |||
@@ -4,6 +4,7 @@ namespace WixToolsetTest.Converters | |||
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Xml.Linq; | 6 | using System.Xml.Linq; |
7 | using WixBuildTools.TestSupport; | ||
7 | using WixToolset.Converters; | 8 | using WixToolset.Converters; |
8 | using WixToolsetTest.Converters.Mocks; | 9 | using WixToolsetTest.Converters.Mocks; |
9 | using Xunit; | 10 | using Xunit; |
@@ -47,7 +48,7 @@ namespace WixToolsetTest.Converters | |||
47 | Assert.Equal(1, errors); | 48 | Assert.Equal(1, errors); |
48 | 49 | ||
49 | var actualLines = UnformattedDocumentLines(document); | 50 | var actualLines = UnformattedDocumentLines(document); |
50 | CompareLineByLine(expected, actualLines); | 51 | WixAssert.CompareLineByLine(expected, actualLines); |
51 | } | 52 | } |
52 | } | 53 | } |
53 | } | 54 | } |