From 1144983d580524f1e22e0ddd2416955cda8063d2 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 15 Feb 2019 19:08:58 -0600 Subject: WIXFEAT:3815 - Update mbahost test for BootstrapperApplicationFactoryAttribute. --- .../TestManagedBootstrapperApplication.h | 8 +++++-- .../TestManagedBootstrapperApplicationFactory.h | 25 ++++++++++++++++++++++ .../WixToolsetTest.MbaHost.vcxproj | 7 +++--- src/test/WixToolsetTest.MbaHost/packages.config | 2 +- src/test/WixToolsetTest.MbaHost/precomp.h | 1 + 5 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplicationFactory.h (limited to 'src') diff --git a/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h b/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h index 1dfd0d4d..d74d90c5 100644 --- a/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h +++ b/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h @@ -13,6 +13,12 @@ namespace Native public ref class TestManagedBootstrapperApplication : BootstrapperApplication { public: + TestManagedBootstrapperApplication(WixToolset::BootstrapperCore::Engine^ engine, WixToolset::BootstrapperCore::Command command) + : BootstrapperApplication(engine, command) + { + + } + virtual void Run() override { } @@ -23,8 +29,6 @@ namespace Native this->Engine->Log(LogLevel::Standard, message); } }; - - [assembly:BootstrapperApplication(TestManagedBootstrapperApplication::typeid)]; } } } \ No newline at end of file diff --git a/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplicationFactory.h b/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplicationFactory.h new file mode 100644 index 00000000..9d44075b --- /dev/null +++ b/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplicationFactory.h @@ -0,0 +1,25 @@ +#pragma once +// 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 +{ +namespace MbaHost +{ +namespace Native +{ + using namespace System; + using namespace WixToolset::BootstrapperCore; + + public ref class TestManagedBootstrapperApplicationFactory : public BaseBootstrapperApplicationFactory + { + protected: + virtual IBootstrapperApplication^ Create(Engine^ engine, Command% command) override + { + return gcnew TestManagedBootstrapperApplication(engine, command); + } + }; + + [assembly:BootstrapperApplicationFactory(TestManagedBootstrapperApplicationFactory::typeid)]; +} +} +} \ No newline at end of file diff --git a/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj b/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj index 557aaff0..a95a1606 100644 --- a/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj +++ b/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj @@ -2,7 +2,7 @@ - + @@ -42,6 +42,7 @@ + @@ -65,7 +66,7 @@ ..\..\..\packages\xunit.extensibility.execution.2.4.0\lib\net452\xunit.execution.desktop.dll - ..\..\..\packages\WixToolset.BootstrapperCore.4.0.3\lib\net20\WixToolset.BootstrapperCore.dll + ..\..\..\packages\WixToolset.BootstrapperCore.4.0.4\lib\net20\WixToolset.BootstrapperCore.dll @@ -82,7 +83,7 @@ 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}. - + diff --git a/src/test/WixToolsetTest.MbaHost/packages.config b/src/test/WixToolsetTest.MbaHost/packages.config index c3b6551c..d534f781 100644 --- a/src/test/WixToolsetTest.MbaHost/packages.config +++ b/src/test/WixToolsetTest.MbaHost/packages.config @@ -9,6 +9,6 @@ - + \ No newline at end of file diff --git a/src/test/WixToolsetTest.MbaHost/precomp.h b/src/test/WixToolsetTest.MbaHost/precomp.h index aa4b6ddc..7c451c03 100644 --- a/src/test/WixToolsetTest.MbaHost/precomp.h +++ b/src/test/WixToolsetTest.MbaHost/precomp.h @@ -13,3 +13,4 @@ #include "EngineForTest.h" #include "TestManagedBootstrapperApplication.h" +#include "TestManagedBootstrapperApplicationFactory.h" -- cgit v1.2.3-55-g6feb