From 612dc390ecd90bf4079ad7545f4a4832ce8f702d Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 27 Apr 2021 22:37:33 -0700 Subject: Move Converters into wix --- .../BootstrapperApplicationFixture.cs | 418 --------------------- 1 file changed, 418 deletions(-) delete mode 100644 src/test/WixToolsetTest.Converters/BootstrapperApplicationFixture.cs (limited to 'src/test/WixToolsetTest.Converters/BootstrapperApplicationFixture.cs') diff --git a/src/test/WixToolsetTest.Converters/BootstrapperApplicationFixture.cs b/src/test/WixToolsetTest.Converters/BootstrapperApplicationFixture.cs deleted file mode 100644 index 158ab3be..00000000 --- a/src/test/WixToolsetTest.Converters/BootstrapperApplicationFixture.cs +++ /dev/null @@ -1,418 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolsetTest.Converters -{ - using System; - using System.Xml.Linq; - using WixBuildTools.TestSupport; - using WixToolset.Converters; - using WixToolsetTest.Converters.Mocks; - using Xunit; - - public class BootstrapperApplicationFixture : BaseConverterFixture - { - [Fact] - public void CantCreateBootstrapperApplicationDllFromV3PayloadGroupRef() - { - var parse = String.Join(Environment.NewLine, - "", - " ", - " ", - " ", - " ", - " ", - ""); - - var expected = new[] - { - "", - " ", - " ", - " ", - " ", - " ", - "" - }; - - var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); - - var messaging = new MockMessaging(); - var converter = new WixConverter(messaging, 2, null, null); - - var errors = converter.ConvertDocument(document); - Assert.Equal(2, errors); - - var actualLines = UnformattedDocumentLines(document); - WixAssert.CompareLineByLine(expected, actualLines); - } - - [Fact] - public void ConvertDotNetCoreBootstrapperApplicationRefWithExistingElement() - { - var parse = String.Join(Environment.NewLine, - "", - " ", - " ", - " ", - " ", - " ", - ""); - - var expected = new[] - { - "", - " ", - " ", - " ", - " ", - " ", - "" - }; - - var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); - - var messaging = new MockMessaging(); - var converter = new WixConverter(messaging, 2, null, null); - - var errors = converter.ConvertDocument(document); - Assert.Equal(1, errors); - - var actualLines = UnformattedDocumentLines(document); - WixAssert.CompareLineByLine(expected, actualLines); - } - - [Fact] - public void ConvertDotNetCoreBootstrapperApplicationRefWithoutExistingElement() - { - var parse = String.Join(Environment.NewLine, - "", - " ", - " ", - " ", - ""); - - var expected = new[] - { - "", - " ", - " ", - "", - "", - " ", - "" - }; - - var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); - - var messaging = new MockMessaging(); - var converter = new WixConverter(messaging, 2, null, null); - - var errors = converter.ConvertDocument(document); - Assert.Equal(1, errors); - - var actualLines = UnformattedDocumentLines(document); - WixAssert.CompareLineByLine(expected, actualLines); - } - - [Fact] - public void ConvertFrameworkBootstrapperApplicationRefWithExistingElement() - { - var parse = String.Join(Environment.NewLine, - "", - " ", - " ", - " ", - " ", - " ", - ""); - - var expected = new[] - { - "", - " ", - " ", - " ", - " ", - " ", - "" - }; - - var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); - - var messaging = new MockMessaging(); - var converter = new WixConverter(messaging, 2, null, null); - - var errors = converter.ConvertDocument(document); - Assert.Equal(3, errors); - - var actualLines = UnformattedDocumentLines(document); - WixAssert.CompareLineByLine(expected, actualLines); - } - - [Fact] - public void ConvertFrameworkBootstrapperApplicationRefWithoutExistingElement() - { - var parse = String.Join(Environment.NewLine, - "", - " ", - " ", - " ", - ""); - - var expected = new[] - { - "", - " ", - " ", - "", - "", - " ", - "" - }; - - var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); - - var messaging = new MockMessaging(); - var converter = new WixConverter(messaging, 2, null, null); - - var errors = converter.ConvertDocument(document); - Assert.Equal(3, errors); - - var actualLines = UnformattedDocumentLines(document); - WixAssert.CompareLineByLine(expected, actualLines); - } - - [Fact] - public void ConvertStandardBootstrapperApplicationRefWithExistingElement() - { - var parse = String.Join(Environment.NewLine, - "", - " ", - " ", - " ", - " ", - " ", - ""); - - var expected = new[] - { - "", - " ", - " ", - " ", - " ", - " ", - "" - }; - - var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); - - var messaging = new MockMessaging(); - var converter = new WixConverter(messaging, 2, null, null); - - var errors = converter.ConvertDocument(document); - Assert.Equal(3, errors); - - var actualLines = UnformattedDocumentLines(document); - WixAssert.CompareLineByLine(expected, actualLines); - } - - [Fact] - public void ConvertStandardBootstrapperApplicationRefWithoutExistingElement() - { - var parse = String.Join(Environment.NewLine, - "", - " ", - " ", - " ", - ""); - - var expected = new[] - { - "", - " ", - " ", - "", - "", - " ", - "" - }; - - var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); - - var messaging = new MockMessaging(); - var converter = new WixConverter(messaging, 2, null, null); - - var errors = converter.ConvertDocument(document); - Assert.Equal(3, errors); - - var actualLines = UnformattedDocumentLines(document); - WixAssert.CompareLineByLine(expected, actualLines); - } - - [Fact] - public void CreateBootstrapperApplicationDllFromV3() - { - var parse = String.Join(Environment.NewLine, - "", - " ", - " ", - " ", - ""); - - var expected = new[] - { - "", - " ", - " ", - "", - "", - " ", - "" - }; - - var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); - - var messaging = new MockMessaging(); - var converter = new WixConverter(messaging, 2, null, null); - - var errors = converter.ConvertDocument(document); - Assert.Equal(3, errors); - - var actualLines = UnformattedDocumentLines(document); - WixAssert.CompareLineByLine(expected, actualLines); - } - - [Fact] - public void CreateBootstrapperApplicationDllFromV3Payload() - { - var parse = String.Join(Environment.NewLine, - "", - " ", - " ", - " ", - " ", - " ", - ""); - - var expected = new[] - { - "", - " ", - " ", - " ", - " ", - "", - "", - " ", - "" - }; - - var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); - - var messaging = new MockMessaging(); - var converter = new WixConverter(messaging, 2, null, null); - - var errors = converter.ConvertDocument(document); - Assert.Equal(3, errors); - - var actualLines = UnformattedDocumentLines(document); - WixAssert.CompareLineByLine(expected, actualLines); - } - - [Fact] - public void DoesntSetDpiUnawareFromV4() - { - var parse = String.Join(Environment.NewLine, - "", - " ", - " ", - " ", - ""); - - var expected = new[] - { - "", - " ", - " ", - " ", - "" - }; - - var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); - - var messaging = new MockMessaging(); - var converter = new WixConverter(messaging, 2, null, null); - - var errors = converter.ConvertDocument(document); - Assert.Equal(0, errors); - - var actualLines = UnformattedDocumentLines(document); - WixAssert.CompareLineByLine(expected, actualLines); - } - - [Fact] - public void KeepsDpiAwarenessFromV4() - { - var parse = String.Join(Environment.NewLine, - "", - " ", - " ", - " ", - ""); - - var expected = new[] - { - "", - " ", - " ", - "", - "", - " ", - "" - }; - - var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); - - var messaging = new MockMessaging(); - var converter = new WixConverter(messaging, 2, null, null); - - var errors = converter.ConvertDocument(document); - Assert.Equal(1, errors); - - var actualLines = UnformattedDocumentLines(document); - WixAssert.CompareLineByLine(expected, actualLines); - } - - [Fact] - public void RemovesBalUseUILanguages() - { - var parse = String.Join(Environment.NewLine, - "", - " ", - " ", - " ", - ""); - - var expected = new[] - { - "", - " ", - " ", - " ", - "" - }; - - var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); - - var messaging = new MockMessaging(); - var converter = new WixConverter(messaging, 2, null, null); - - var errors = converter.ConvertDocument(document); - Assert.Equal(5, errors); - - var actualLines = UnformattedDocumentLines(document); - WixAssert.CompareLineByLine(expected, actualLines); - } - } -} -- cgit v1.2.3-55-g6feb