diff options
Diffstat (limited to 'src/api/burn/test/BextUtilUnitTest/BootstrapperExtensionTests.cpp')
-rw-r--r-- | src/api/burn/test/BextUtilUnitTest/BootstrapperExtensionTests.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/api/burn/test/BextUtilUnitTest/BootstrapperExtensionTests.cpp b/src/api/burn/test/BextUtilUnitTest/BootstrapperExtensionTests.cpp new file mode 100644 index 00000000..c2882587 --- /dev/null +++ b/src/api/burn/test/BextUtilUnitTest/BootstrapperExtensionTests.cpp | |||
@@ -0,0 +1,44 @@ | |||
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 | |||
5 | using namespace System; | ||
6 | using namespace Xunit; | ||
7 | using namespace WixInternal::TestSupport; | ||
8 | using namespace WixInternal::TestSupport::XunitExtensions; | ||
9 | |||
10 | namespace BextUtilTests | ||
11 | { | ||
12 | public ref class BootstrapperExtension | ||
13 | { | ||
14 | public: | ||
15 | [Fact] | ||
16 | void CanCreateTestBootstrapperExtension() | ||
17 | { | ||
18 | HRESULT hr = S_OK; | ||
19 | BOOTSTRAPPER_EXTENSION_CREATE_ARGS args = { }; | ||
20 | BOOTSTRAPPER_EXTENSION_CREATE_RESULTS results = { }; | ||
21 | IBootstrapperExtensionEngine* pEngine = NULL; | ||
22 | IBootstrapperExtension* pBootstrapperExtension = NULL; | ||
23 | |||
24 | args.cbSize = sizeof(args); | ||
25 | args.wzBootstrapperExtensionDataPath = L"test.xml"; | ||
26 | |||
27 | results.cbSize = sizeof(results); | ||
28 | |||
29 | try | ||
30 | { | ||
31 | hr = BextInitializeFromCreateArgs(&args, &pEngine); | ||
32 | NativeAssert::Succeeded(hr, "Failed to create engine."); | ||
33 | |||
34 | hr = TestBootstrapperExtensionCreate(pEngine, &args, &results, &pBootstrapperExtension); | ||
35 | NativeAssert::Succeeded(hr, "Failed to create BootstrapperApplication."); | ||
36 | } | ||
37 | finally | ||
38 | { | ||
39 | ReleaseObject(pEngine); | ||
40 | ReleaseObject(pBootstrapperExtension); | ||
41 | } | ||
42 | } | ||
43 | }; | ||
44 | } | ||