diff options
Diffstat (limited to 'src/api/burn/test/BalUtilUnitTest/BootstrapperApplicationTests.cpp')
-rw-r--r-- | src/api/burn/test/BalUtilUnitTest/BootstrapperApplicationTests.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/api/burn/test/BalUtilUnitTest/BootstrapperApplicationTests.cpp b/src/api/burn/test/BalUtilUnitTest/BootstrapperApplicationTests.cpp new file mode 100644 index 00000000..396682ee --- /dev/null +++ b/src/api/burn/test/BalUtilUnitTest/BootstrapperApplicationTests.cpp | |||
@@ -0,0 +1,45 @@ | |||
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 WixBuildTools::TestSupport; | ||
8 | using namespace WixBuildTools::TestSupport::XunitExtensions; | ||
9 | |||
10 | namespace BalUtilTests | ||
11 | { | ||
12 | public ref class BootstrapperApplication | ||
13 | { | ||
14 | public: | ||
15 | [Fact] | ||
16 | void CanCreateTestBootstrapperApplication() | ||
17 | { | ||
18 | HRESULT hr = S_OK; | ||
19 | BOOTSTRAPPER_CREATE_ARGS args = { }; | ||
20 | BOOTSTRAPPER_COMMAND command = { }; | ||
21 | BOOTSTRAPPER_CREATE_RESULTS results = { }; | ||
22 | IBootstrapperEngine* pEngine = NULL; | ||
23 | IBootstrapperApplication* pApplication = NULL; | ||
24 | |||
25 | args.cbSize = sizeof(args); | ||
26 | args.pCommand = &command; | ||
27 | |||
28 | results.cbSize = sizeof(results); | ||
29 | |||
30 | try | ||
31 | { | ||
32 | hr = BalInitializeFromCreateArgs(&args, &pEngine); | ||
33 | NativeAssert::Succeeded(hr, "Failed to create engine."); | ||
34 | |||
35 | hr = CreateBootstrapperApplication(pEngine, &args, &results, &pApplication); | ||
36 | NativeAssert::Succeeded(hr, "Failed to create BootstrapperApplication."); | ||
37 | } | ||
38 | finally | ||
39 | { | ||
40 | ReleaseObject(pEngine); | ||
41 | ReleaseObject(pApplication); | ||
42 | } | ||
43 | } | ||
44 | }; | ||
45 | } | ||