From c237bb3bb00d36c50271a70baac68f49890e35e1 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Mon, 24 Aug 2020 17:25:00 -0400 Subject: Update decompiler to use XDocument rather than generated classes. - Use CompareXml for diffing. - Change CustomAction/@ScriptFile to @ScriptSourceFile. --- .../WixToolsetTest.CoreIntegration/CustomTableFixture.cs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'src/test/WixToolsetTest.CoreIntegration/CustomTableFixture.cs') diff --git a/src/test/WixToolsetTest.CoreIntegration/CustomTableFixture.cs b/src/test/WixToolsetTest.CoreIntegration/CustomTableFixture.cs index 0a45c914..4a5cf544 100644 --- a/src/test/WixToolsetTest.CoreIntegration/CustomTableFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/CustomTableFixture.cs @@ -3,6 +3,7 @@ namespace WixToolsetTest.CoreIntegration { using System.IO; + using System.Xml.Linq; using WixBuildTools.TestSupport; using WixToolset.Core.TestPackage; using Xunit; @@ -224,20 +225,8 @@ namespace WixToolsetTest.CoreIntegration result.AssertSuccess(); - CompareLineByLine(expectedFile, decompiledWxsPath); + WixAssert.CompareXml(expectedFile, decompiledWxsPath); } } - - private static void CompareLineByLine(string expectedFile, string actualFile) - { - var expectedLines = File.ReadAllLines(expectedFile); - var actualLines = File.ReadAllLines(actualFile); - for (var i = 0; i < expectedLines.Length; ++i) - { - Assert.True(actualLines.Length > i, $"{i}: Expected file longer than actual file"); - Assert.Equal($"{i}: {expectedLines[i]}", $"{i}: {actualLines[i]}"); - } - Assert.True(expectedLines.Length == actualLines.Length, "Actual file longer than expected file"); - } } } -- cgit v1.2.3-55-g6feb