aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-04-22 05:46:03 -0700
committerRob Mensching <rob@firegiant.com>2021-04-29 16:41:44 -0700
commitc00516901e6b67e398396b14fe7682d0376f8643 (patch)
treeb0d62089a1c5700c7f2c3e3790750bf2d8ea33c0 /src/test
parent8eb98efd2175d9ece2e4639d43081667af9a4990 (diff)
downloadwix-c00516901e6b67e398396b14fe7682d0376f8643.tar.gz
wix-c00516901e6b67e398396b14fe7682d0376f8643.tar.bz2
wix-c00516901e6b67e398396b14fe7682d0376f8643.zip
Move balutil into API/burn
Diffstat (limited to 'src/test')
-rw-r--r--src/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj76
-rw-r--r--src/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj.filters33
-rw-r--r--src/test/BalUtilUnitTest/TestBAFunctions.cpp41
-rw-r--r--src/test/BalUtilUnitTest/TestBootstrapperApplication.cpp39
-rw-r--r--src/test/BalUtilUnitTest/packages.config15
-rw-r--r--src/test/BalUtilUnitTest/precomp.cpp3
-rw-r--r--src/test/BalUtilUnitTest/precomp.h23
-rw-r--r--src/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj75
-rw-r--r--src/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj.filters30
-rw-r--r--src/test/BextUtilUnitTest/TestBundleExtension.cpp42
-rw-r--r--src/test/BextUtilUnitTest/packages.config15
-rw-r--r--src/test/BextUtilUnitTest/precomp.cpp3
-rw-r--r--src/test/BextUtilUnitTest/precomp.h19
-rw-r--r--src/test/WixToolsetTest.Mba.Core/BaseBootstrapperApplicationFactoryFixture.cs132
-rw-r--r--src/test/WixToolsetTest.Mba.Core/VerUtilFixture.cs93
-rw-r--r--src/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.csproj21
-rw-r--r--src/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.v3.ncrunchproject5
17 files changed, 0 insertions, 665 deletions
diff --git a/src/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj b/src/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj
deleted file mode 100644
index d3a81e2a..00000000
--- a/src/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj
+++ /dev/null
@@ -1,76 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3
4
5<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props')" />
7 <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props')" />
8 <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" />
9 <ItemGroup Label="ProjectConfigurations">
10 <ProjectConfiguration Include="Debug|Win32">
11 <Configuration>Debug</Configuration>
12 <Platform>Win32</Platform>
13 </ProjectConfiguration>
14 <ProjectConfiguration Include="Release|Win32">
15 <Configuration>Release</Configuration>
16 <Platform>Win32</Platform>
17 </ProjectConfiguration>
18 </ItemGroup>
19 <PropertyGroup Label="Globals">
20 <ProjectTypes>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}</ProjectTypes>
21 <ProjectGuid>{9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}</ProjectGuid>
22 <RootNamespace>UnitTest</RootNamespace>
23 <Keyword>ManagedCProj</Keyword>
24 <ConfigurationType>DynamicLibrary</ConfigurationType>
25 <CharacterSet>Unicode</CharacterSet>
26 <CLRSupport>true</CLRSupport>
27 <SignOutput>false</SignOutput>
28 </PropertyGroup>
29 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
30 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
31 <PropertyGroup>
32 <ProjectAdditionalIncludeDirectories>..\..\balutil\inc</ProjectAdditionalIncludeDirectories>
33 <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib</ProjectAdditionalLinkLibraries>
34 </PropertyGroup>
35 <ItemGroup>
36 <ClCompile Include="precomp.cpp">
37 <PrecompiledHeader>Create</PrecompiledHeader>
38 <!-- Warnings from referencing netstandard dlls -->
39 <DisableSpecificWarnings>4564;4691</DisableSpecificWarnings>
40 </ClCompile>
41 <ClCompile Include="TestBAFunctions.cpp" />
42 <ClCompile Include="TestBootstrapperApplication.cpp" />
43 </ItemGroup>
44 <ItemGroup>
45 <ClInclude Include="precomp.h" />
46 </ItemGroup>
47 <ItemGroup>
48 <None Include="packages.config" />
49 </ItemGroup>
50 <ItemGroup>
51 <Reference Include="System" />
52 <Reference Include="System.Core" />
53 <Reference Include="WixBuildTools.TestSupport">
54 <HintPath>..\..\..\packages\WixBuildTools.TestSupport.4.0.50\lib\net472\WixBuildTools.TestSupport.dll</HintPath>
55 </Reference>
56 <Reference Include="WixBuildTools.TestSupport.Native">
57 <HintPath>..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\lib\net472\WixBuildTools.TestSupport.Native.dll</HintPath>
58 </Reference>
59 </ItemGroup>
60 <ItemGroup>
61 <ProjectReference Include="..\..\balutil\balutil.vcxproj">
62 <Project>{EDCB8095-0E6A-43E0-BC33-C4F762FC5CDB}</Project>
63 </ProjectReference>
64 </ItemGroup>
65 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
66 <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets')" />
67 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
68 <PropertyGroup>
69 <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
70 </PropertyGroup>
71 <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props'))" />
72 <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets'))" />
73 <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props'))" />
74 <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props'))" />
75 </Target>
76</Project> \ No newline at end of file
diff --git a/src/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj.filters b/src/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj.filters
deleted file mode 100644
index 85f31076..00000000
--- a/src/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj.filters
+++ /dev/null
@@ -1,33 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup>
4 <Filter Include="Source Files">
5 <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6 <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7 </Filter>
8 <Filter Include="Header Files">
9 <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10 <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
11 </Filter>
12 <Filter Include="Resource Files">
13 <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14 <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
15 </Filter>
16 </ItemGroup>
17 <ItemGroup>
18 <ClCompile Include="precomp.cpp">
19 <Filter>Source Files</Filter>
20 </ClCompile>
21 <ClCompile Include="TestBAFunctions.cpp">
22 <Filter>Source Files</Filter>
23 </ClCompile>
24 <ClCompile Include="TestBootstrapperApplication.cpp">
25 <Filter>Source Files</Filter>
26 </ClCompile>
27 </ItemGroup>
28 <ItemGroup>
29 <ClInclude Include="precomp.h">
30 <Filter>Header Files</Filter>
31 </ClInclude>
32 </ItemGroup>
33</Project> \ No newline at end of file
diff --git a/src/test/BalUtilUnitTest/TestBAFunctions.cpp b/src/test/BalUtilUnitTest/TestBAFunctions.cpp
deleted file mode 100644
index 927a8d10..00000000
--- a/src/test/BalUtilUnitTest/TestBAFunctions.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
1// 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.
2
3#include "precomp.h"
4#include "BalBaseBAFunctions.h"
5#include "BalBaseBAFunctionsProc.h"
6
7class CTestBAFunctions : public CBalBaseBAFunctions
8{
9public:
10 CTestBAFunctions(
11 __in HMODULE hModule,
12 __in IBootstrapperEngine* pEngine,
13 __in const BA_FUNCTIONS_CREATE_ARGS* pArgs
14 ) : CBalBaseBAFunctions(hModule, pEngine, pArgs)
15 {
16 }
17};
18
19HRESULT CreateBAFunctions(
20 __in HMODULE hModule,
21 __in IBootstrapperEngine* pEngine,
22 __in const BA_FUNCTIONS_CREATE_ARGS* pArgs,
23 __in BA_FUNCTIONS_CREATE_RESULTS* pResults,
24 __out IBAFunctions** ppApplication
25 )
26{
27 HRESULT hr = S_OK;
28 CTestBAFunctions* pApplication = NULL;
29
30 pApplication = new CTestBAFunctions(hModule, pEngine, pArgs);
31 ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new test bafunctions object.");
32
33 pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc;
34 pResults->pvBAFunctionsProcContext = pApplication;
35 *ppApplication = pApplication;
36 pApplication = NULL;
37
38LExit:
39 ReleaseObject(pApplication);
40 return hr;
41}
diff --git a/src/test/BalUtilUnitTest/TestBootstrapperApplication.cpp b/src/test/BalUtilUnitTest/TestBootstrapperApplication.cpp
deleted file mode 100644
index 13d22e72..00000000
--- a/src/test/BalUtilUnitTest/TestBootstrapperApplication.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
1// 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.
2
3#include "precomp.h"
4#include "BalBaseBootstrapperApplication.h"
5#include "BalBaseBootstrapperApplicationProc.h"
6
7class CTestBootstrapperApplication : public CBalBaseBootstrapperApplication
8{
9public:
10 CTestBootstrapperApplication(
11 __in IBootstrapperEngine* pEngine,
12 __in const BOOTSTRAPPER_CREATE_ARGS* pArgs
13 ) : CBalBaseBootstrapperApplication(pEngine, pArgs)
14 {
15 }
16};
17
18HRESULT CreateBootstrapperApplication(
19 __in IBootstrapperEngine* pEngine,
20 __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
21 __inout BOOTSTRAPPER_CREATE_RESULTS* pResults,
22 __out IBootstrapperApplication** ppApplication
23 )
24{
25 HRESULT hr = S_OK;
26 CTestBootstrapperApplication* pApplication = NULL;
27
28 pApplication = new CTestBootstrapperApplication(pEngine, pArgs);
29 ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new test bootstrapper application object.");
30
31 pResults->pfnBootstrapperApplicationProc = BalBaseBootstrapperApplicationProc;
32 pResults->pvBootstrapperApplicationProcContext = pApplication;
33 *ppApplication = pApplication;
34 pApplication = NULL;
35
36LExit:
37 ReleaseObject(pApplication);
38 return hr;
39}
diff --git a/src/test/BalUtilUnitTest/packages.config b/src/test/BalUtilUnitTest/packages.config
deleted file mode 100644
index 6d381fbe..00000000
--- a/src/test/BalUtilUnitTest/packages.config
+++ /dev/null
@@ -1,15 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3<packages>
4 <package id="WixBuildTools.TestSupport" version="4.0.50" />
5 <package id="WixBuildTools.TestSupport.Native" version="4.0.50" />
6 <package id="WixToolset.BootstrapperCore.Native" version="4.0.141" targetFramework="native" />
7 <package id="WixToolset.DUtil" version="4.0.72" targetFramework="native" />
8 <package id="xunit.abstractions" version="2.0.3" />
9 <package id="xunit.assert" version="2.4.1" />
10 <package id="xunit.core" version="2.4.1" />
11 <package id="xunit.extensibility.core" version="2.4.1" />
12 <package id="xunit.extensibility.execution" version="2.4.1" />
13 <package id="xunit.runner.msbuild" version="2.4.1" />
14 <package id="xunit.runner.visualstudio" version="2.4.1" />
15</packages> \ No newline at end of file
diff --git a/src/test/BalUtilUnitTest/precomp.cpp b/src/test/BalUtilUnitTest/precomp.cpp
deleted file mode 100644
index 37664a1c..00000000
--- a/src/test/BalUtilUnitTest/precomp.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
1// 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.
2
3#include "precomp.h"
diff --git a/src/test/BalUtilUnitTest/precomp.h b/src/test/BalUtilUnitTest/precomp.h
deleted file mode 100644
index a84391f9..00000000
--- a/src/test/BalUtilUnitTest/precomp.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#pragma once
2// 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.
3
4
5#include <windows.h>
6#include <msiquery.h>
7#include <CommCtrl.h>
8
9#include <dutil.h>
10#include <locutil.h>
11#include <thmutil.h>
12
13#include <BootstrapperEngine.h>
14#include <BootstrapperApplication.h>
15
16#include "IBootstrapperEngine.h"
17#include "IBootstrapperApplication.h"
18#include "balutil.h"
19#include "balretry.h"
20#include "BAFunctions.h"
21
22#pragma managed
23#include <vcclr.h>
diff --git a/src/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj b/src/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj
deleted file mode 100644
index a9937894..00000000
--- a/src/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj
+++ /dev/null
@@ -1,75 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3
4
5<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props')" />
7 <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props')" />
8 <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" />
9 <ItemGroup Label="ProjectConfigurations">
10 <ProjectConfiguration Include="Debug|Win32">
11 <Configuration>Debug</Configuration>
12 <Platform>Win32</Platform>
13 </ProjectConfiguration>
14 <ProjectConfiguration Include="Release|Win32">
15 <Configuration>Release</Configuration>
16 <Platform>Win32</Platform>
17 </ProjectConfiguration>
18 </ItemGroup>
19 <PropertyGroup Label="Globals">
20 <ProjectTypes>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}</ProjectTypes>
21 <ProjectGuid>{B69E6422-49B0-4E28-92F9-B8A7410A6ED9}</ProjectGuid>
22 <RootNamespace>UnitTest</RootNamespace>
23 <Keyword>ManagedCProj</Keyword>
24 <ConfigurationType>DynamicLibrary</ConfigurationType>
25 <CharacterSet>Unicode</CharacterSet>
26 <CLRSupport>true</CLRSupport>
27 <SignOutput>false</SignOutput>
28 </PropertyGroup>
29 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
30 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
31 <PropertyGroup>
32 <ProjectAdditionalIncludeDirectories>..\..\bextutil\inc</ProjectAdditionalIncludeDirectories>
33 <ProjectAdditionalLinkLibraries></ProjectAdditionalLinkLibraries>
34 </PropertyGroup>
35 <ItemGroup>
36 <ClCompile Include="precomp.cpp">
37 <PrecompiledHeader>Create</PrecompiledHeader>
38 <!-- Warnings from referencing netstandard dlls -->
39 <DisableSpecificWarnings>4564;4691</DisableSpecificWarnings>
40 </ClCompile>
41 <ClCompile Include="TestBundleExtension.cpp" />
42 </ItemGroup>
43 <ItemGroup>
44 <ClInclude Include="precomp.h" />
45 </ItemGroup>
46 <ItemGroup>
47 <None Include="packages.config" />
48 </ItemGroup>
49 <ItemGroup>
50 <Reference Include="System" />
51 <Reference Include="System.Core" />
52 <Reference Include="WixBuildTools.TestSupport">
53 <HintPath>..\..\..\packages\WixBuildTools.TestSupport.4.0.50\lib\net472\WixBuildTools.TestSupport.dll</HintPath>
54 </Reference>
55 <Reference Include="WixBuildTools.TestSupport.Native">
56 <HintPath>..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\lib\net472\WixBuildTools.TestSupport.Native.dll</HintPath>
57 </Reference>
58 </ItemGroup>
59 <ItemGroup>
60 <ProjectReference Include="..\..\balutil\balutil.vcxproj">
61 <Project>{06027492-1CB9-48BC-B31E-C1F9356ED07E}</Project>
62 </ProjectReference>
63 </ItemGroup>
64 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
65 <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets')" />
66 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
67 <PropertyGroup>
68 <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
69 </PropertyGroup>
70 <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props'))" />
71 <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets'))" />
72 <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props'))" />
73 <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props'))" />
74 </Target>
75</Project> \ No newline at end of file
diff --git a/src/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj.filters b/src/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj.filters
deleted file mode 100644
index f1711f81..00000000
--- a/src/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj.filters
+++ /dev/null
@@ -1,30 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup>
4 <Filter Include="Source Files">
5 <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6 <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7 </Filter>
8 <Filter Include="Header Files">
9 <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10 <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
11 </Filter>
12 <Filter Include="Resource Files">
13 <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14 <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
15 </Filter>
16 </ItemGroup>
17 <ItemGroup>
18 <ClCompile Include="precomp.cpp">
19 <Filter>Source Files</Filter>
20 </ClCompile>
21 <ClCompile Include="TestBundleExtension.cpp">
22 <Filter>Source Files</Filter>
23 </ClCompile>
24 </ItemGroup>
25 <ItemGroup>
26 <ClInclude Include="precomp.h">
27 <Filter>Header Files</Filter>
28 </ClInclude>
29 </ItemGroup>
30</Project> \ No newline at end of file
diff --git a/src/test/BextUtilUnitTest/TestBundleExtension.cpp b/src/test/BextUtilUnitTest/TestBundleExtension.cpp
deleted file mode 100644
index 921303bb..00000000
--- a/src/test/BextUtilUnitTest/TestBundleExtension.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
1// 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.
2
3#include "precomp.h"
4#include "BextBaseBundleExtension.h"
5#include "BextBaseBundleExtensionProc.h"
6
7class CTestBundleExtension : public CBextBaseBundleExtension
8{
9public:
10 CTestBundleExtension(
11 __in IBundleExtensionEngine* pEngine
12 ) : CBextBaseBundleExtension(pEngine)
13 {
14 }
15};
16
17HRESULT TestBundleExtensionCreate(
18 __in IBundleExtensionEngine* pEngine,
19 __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs,
20 __inout BUNDLE_EXTENSION_CREATE_RESULTS* pResults,
21 __out IBundleExtension** ppBundleExtension
22 )
23{
24 HRESULT hr = S_OK;
25 CTestBundleExtension* pExtension = NULL;
26
27 pExtension = new CTestBundleExtension(pEngine);
28 ExitOnNull(pExtension, hr, E_OUTOFMEMORY, "Failed to create new CTestBundleExtension.");
29
30 hr = pExtension->Initialize(pArgs);
31 ExitOnFailure(hr, "CTestBundleExtension initialization failed");
32
33 pResults->pfnBundleExtensionProc = BextBaseBundleExtensionProc;
34 pResults->pvBundleExtensionProcContext = pExtension;
35
36 *ppBundleExtension = pExtension;
37 pExtension = NULL;
38
39LExit:
40 ReleaseObject(pExtension);
41 return hr;
42}
diff --git a/src/test/BextUtilUnitTest/packages.config b/src/test/BextUtilUnitTest/packages.config
deleted file mode 100644
index 6d381fbe..00000000
--- a/src/test/BextUtilUnitTest/packages.config
+++ /dev/null
@@ -1,15 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3<packages>
4 <package id="WixBuildTools.TestSupport" version="4.0.50" />
5 <package id="WixBuildTools.TestSupport.Native" version="4.0.50" />
6 <package id="WixToolset.BootstrapperCore.Native" version="4.0.141" targetFramework="native" />
7 <package id="WixToolset.DUtil" version="4.0.72" targetFramework="native" />
8 <package id="xunit.abstractions" version="2.0.3" />
9 <package id="xunit.assert" version="2.4.1" />
10 <package id="xunit.core" version="2.4.1" />
11 <package id="xunit.extensibility.core" version="2.4.1" />
12 <package id="xunit.extensibility.execution" version="2.4.1" />
13 <package id="xunit.runner.msbuild" version="2.4.1" />
14 <package id="xunit.runner.visualstudio" version="2.4.1" />
15</packages> \ No newline at end of file
diff --git a/src/test/BextUtilUnitTest/precomp.cpp b/src/test/BextUtilUnitTest/precomp.cpp
deleted file mode 100644
index 37664a1c..00000000
--- a/src/test/BextUtilUnitTest/precomp.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
1// 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.
2
3#include "precomp.h"
diff --git a/src/test/BextUtilUnitTest/precomp.h b/src/test/BextUtilUnitTest/precomp.h
deleted file mode 100644
index a6586f70..00000000
--- a/src/test/BextUtilUnitTest/precomp.h
+++ /dev/null
@@ -1,19 +0,0 @@
1#pragma once
2// 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.
3
4
5#include <windows.h>
6#include <msiquery.h>
7
8#include <dutil.h>
9#include <strutil.h>
10
11#include <BundleExtensionEngine.h>
12#include <BundleExtension.h>
13
14#include "IBundleExtensionEngine.h"
15#include "IBundleExtension.h"
16#include "bextutil.h"
17
18#pragma managed
19#include <vcclr.h>
diff --git a/src/test/WixToolsetTest.Mba.Core/BaseBootstrapperApplicationFactoryFixture.cs b/src/test/WixToolsetTest.Mba.Core/BaseBootstrapperApplicationFactoryFixture.cs
deleted file mode 100644
index aaf5ee29..00000000
--- a/src/test/WixToolsetTest.Mba.Core/BaseBootstrapperApplicationFactoryFixture.cs
+++ /dev/null
@@ -1,132 +0,0 @@
1// 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.
2
3namespace WixToolsetTest.Mba.Core
4{
5 using System;
6 using System.Runtime.InteropServices;
7 using WixToolset.Mba.Core;
8 using Xunit;
9
10 public class BaseBootstrapperApplicationFactoryFixture
11 {
12 [Fact]
13 public void CanCreateBA()
14 {
15 var command = new TestCommand
16 {
17 action = LaunchAction.Install,
18 cbSize = Marshal.SizeOf(typeof(TestCommand)),
19 display = Display.Full,
20 wzCommandLine = "this \"is a\" test",
21 };
22 var pCommand = Marshal.AllocHGlobal(command.cbSize);
23 try
24 {
25 Marshal.StructureToPtr(command, pCommand, false);
26 var createArgs = new BootstrapperCreateArgs(0, IntPtr.Zero, IntPtr.Zero, pCommand);
27 var pArgs = Marshal.AllocHGlobal(createArgs.cbSize);
28 try
29 {
30 Marshal.StructureToPtr(createArgs, pArgs, false);
31 var createResults = new TestCreateResults
32 {
33 cbSize = Marshal.SizeOf<TestCreateResults>(),
34 };
35 var pResults = Marshal.AllocHGlobal(createResults.cbSize);
36 try
37 {
38 var baFactory = new TestBAFactory();
39 baFactory.Create(pArgs, pResults);
40
41 createResults = Marshal.PtrToStructure<TestCreateResults>(pResults);
42 Assert.Equal(baFactory.BA, createResults.pBA);
43 Assert.Equal(baFactory.BA.Command.Action, command.action);
44 Assert.Equal(baFactory.BA.Command.Display, command.display);
45 Assert.Equal(baFactory.BA.Command.CommandLineArgs, new string[] { "this", "is a", "test" });
46 }
47 finally
48 {
49 Marshal.FreeHGlobal(pResults);
50 }
51 }
52 finally
53 {
54 Marshal.FreeHGlobal(pArgs);
55 }
56 }
57 finally
58 {
59 Marshal.FreeHGlobal(pCommand);
60 }
61 }
62
63 internal class TestBAFactory : BaseBootstrapperApplicationFactory
64 {
65 public TestBA BA { get; private set; }
66
67 protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand)
68 {
69 this.BA = new TestBA(engine, bootstrapperCommand);
70 return this.BA;
71 }
72 }
73
74 internal class TestBA : BootstrapperApplication
75 {
76 public IBootstrapperCommand Command { get; }
77
78 public TestBA(IEngine engine, IBootstrapperCommand command)
79 : base(engine)
80 {
81 this.Command = command;
82 }
83
84 protected override void Run()
85 {
86 }
87 }
88
89 [StructLayout(LayoutKind.Sequential)]
90 public struct TestCommand
91 {
92 public int cbSize;
93 public LaunchAction action;
94 public Display display;
95 public Restart restart;
96 [MarshalAs(UnmanagedType.LPWStr)] public string wzCommandLine;
97 public int nCmdShow;
98 public ResumeType resume;
99 public IntPtr hwndSplashScreen;
100 public RelationType relation;
101 [MarshalAs(UnmanagedType.Bool)] public bool passthrough;
102 [MarshalAs(UnmanagedType.LPWStr)] public string wzLayoutDirectory;
103 }
104
105 [StructLayout(LayoutKind.Sequential)]
106 public struct BootstrapperCreateArgs
107 {
108 [MarshalAs(UnmanagedType.I4)] public readonly int cbSize;
109 [MarshalAs(UnmanagedType.I8)] public readonly long qwEngineAPIVersion;
110 public readonly IntPtr pfnBootstrapperEngineProc;
111 public readonly IntPtr pvBootstrapperEngineProcContext;
112 public readonly IntPtr pCommand;
113
114 public BootstrapperCreateArgs(long version, IntPtr pEngineProc, IntPtr pEngineContext, IntPtr pCommand)
115 {
116 this.cbSize = Marshal.SizeOf(typeof(BootstrapperCreateArgs));
117 this.qwEngineAPIVersion = version;
118 this.pfnBootstrapperEngineProc = pEngineProc;
119 this.pvBootstrapperEngineProcContext = pEngineContext;
120 this.pCommand = pCommand;
121 }
122 }
123
124 [StructLayout(LayoutKind.Sequential)]
125 public struct TestCreateResults
126 {
127 public int cbSize;
128 public IntPtr pBAProc;
129 [MarshalAs(UnmanagedType.Interface)] public IBootstrapperApplication pBA;
130 }
131 }
132}
diff --git a/src/test/WixToolsetTest.Mba.Core/VerUtilFixture.cs b/src/test/WixToolsetTest.Mba.Core/VerUtilFixture.cs
deleted file mode 100644
index 44142e3d..00000000
--- a/src/test/WixToolsetTest.Mba.Core/VerUtilFixture.cs
+++ /dev/null
@@ -1,93 +0,0 @@
1// 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.
2
3namespace WixToolsetTest.Mba.Core
4{
5 using System;
6 using WixToolset.Mba.Core;
7 using Xunit;
8
9 public class VerUtilFixture
10 {
11 [Fact]
12 public void CanCompareStringVersions()
13 {
14 var version1 = "1.2.3.4+abcd";
15 var version2 = "1.2.3.4+zyxw";
16
17 Assert.Equal(0, VerUtil.CompareStringVersions(version1, version2, strict: false));
18 }
19
20 [Fact]
21 public void CanCopyVersion()
22 {
23 var version = "1.2.3.4-5.6.7.8.9.0";
24
25 VerUtilVersion copiedVersion = null;
26 try
27 {
28 using (var parsedVersion = VerUtil.ParseVersion(version, strict: true))
29 {
30 copiedVersion = VerUtil.CopyVersion(parsedVersion);
31 }
32
33 using (var secondVersion = VerUtil.ParseVersion(version, strict: true))
34 {
35 Assert.Equal(0, VerUtil.CompareParsedVersions(copiedVersion, secondVersion));
36 }
37 }
38 finally
39 {
40 copiedVersion?.Dispose();
41 }
42 }
43
44 [Fact]
45 public void CanCreateFromQword()
46 {
47 var version = new Version(100, 200, 300, 400);
48 var qwVersion = Engine.VersionToLong(version);
49
50 using var parsedVersion = VerUtil.VersionFromQword(qwVersion);
51 Assert.Equal("100.200.300.400", parsedVersion.Version);
52 Assert.Equal(100u, parsedVersion.Major);
53 Assert.Equal(200u, parsedVersion.Minor);
54 Assert.Equal(300u, parsedVersion.Patch);
55 Assert.Equal(400u, parsedVersion.Revision);
56 Assert.Empty(parsedVersion.ReleaseLabels);
57 Assert.Equal("", parsedVersion.Metadata);
58 Assert.False(parsedVersion.IsInvalid);
59 }
60
61 [Fact]
62 public void CanParseVersion()
63 {
64 var version = "1.2.3.4-a.b.c.d.5.+abc123";
65
66 using var parsedVersion = VerUtil.ParseVersion(version, strict: false);
67 Assert.Equal(version, parsedVersion.Version);
68 Assert.Equal(1u, parsedVersion.Major);
69 Assert.Equal(2u, parsedVersion.Minor);
70 Assert.Equal(3u, parsedVersion.Patch);
71 Assert.Equal(4u, parsedVersion.Revision);
72 Assert.Equal(5, parsedVersion.ReleaseLabels.Length);
73 Assert.Equal("+abc123", parsedVersion.Metadata);
74 Assert.True(parsedVersion.IsInvalid);
75
76 Assert.Equal("a", parsedVersion.ReleaseLabels[0].Label);
77 Assert.False(parsedVersion.ReleaseLabels[0].IsNumeric);
78
79 Assert.Equal("b", parsedVersion.ReleaseLabels[1].Label);
80 Assert.False(parsedVersion.ReleaseLabels[1].IsNumeric);
81
82 Assert.Equal("c", parsedVersion.ReleaseLabels[2].Label);
83 Assert.False(parsedVersion.ReleaseLabels[2].IsNumeric);
84
85 Assert.Equal("d", parsedVersion.ReleaseLabels[3].Label);
86 Assert.False(parsedVersion.ReleaseLabels[3].IsNumeric);
87
88 Assert.Equal("5", parsedVersion.ReleaseLabels[4].Label);
89 Assert.True(parsedVersion.ReleaseLabels[4].IsNumeric);
90 Assert.Equal(5u, parsedVersion.ReleaseLabels[4].Value);
91 }
92 }
93}
diff --git a/src/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.csproj b/src/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.csproj
deleted file mode 100644
index 53d82f7e..00000000
--- a/src/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3
4<Project Sdk="Microsoft.NET.Sdk">
5 <PropertyGroup>
6 <TargetFramework>netcoreapp3.1</TargetFramework>
7 <IsPackable>false</IsPackable>
8 <RuntimeIdentifier>win-x86</RuntimeIdentifier>
9 <SignOutput>false</SignOutput>
10 </PropertyGroup>
11
12 <ItemGroup>
13 <ProjectReference Include="..\..\WixToolset.Mba.Core\WixToolset.Mba.Core.csproj" />
14 </ItemGroup>
15
16 <ItemGroup>
17 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
18 <PackageReference Include="xunit" Version="2.4.1" />
19 <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" />
20 </ItemGroup>
21</Project>
diff --git a/src/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.v3.ncrunchproject b/src/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.v3.ncrunchproject
deleted file mode 100644
index 7b5b2139..00000000
--- a/src/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.v3.ncrunchproject
+++ /dev/null
@@ -1,5 +0,0 @@
1<ProjectConfiguration>
2 <Settings>
3 <CopyReferencedAssembliesToWorkspace>True</CopyReferencedAssembliesToWorkspace>
4 </Settings>
5</ProjectConfiguration> \ No newline at end of file