diff options
Diffstat (limited to 'src/ext/Bal/test/WixStdFnUnitTest/BAFunctionsTests.cpp')
-rw-r--r-- | src/ext/Bal/test/WixStdFnUnitTest/BAFunctionsTests.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/ext/Bal/test/WixStdFnUnitTest/BAFunctionsTests.cpp b/src/ext/Bal/test/WixStdFnUnitTest/BAFunctionsTests.cpp new file mode 100644 index 00000000..ba04c1bb --- /dev/null +++ b/src/ext/Bal/test/WixStdFnUnitTest/BAFunctionsTests.cpp | |||
@@ -0,0 +1,47 @@ | |||
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 BalUtilTests | ||
11 | { | ||
12 | public ref class BAFunctions | ||
13 | { | ||
14 | public: | ||
15 | [Fact(Skip = "Need a mock implementation of IBootstrapperEngine to test BAFunctions.")] | ||
16 | void CanCreateTestBAFunctions() | ||
17 | { | ||
18 | HRESULT hr = S_OK; | ||
19 | BA_FUNCTIONS_CREATE_ARGS args = { }; | ||
20 | BA_FUNCTIONS_CREATE_RESULTS results = { }; | ||
21 | IBootstrapperEngine* pEngine = NULL; | ||
22 | BOOTSTRAPPER_COMMAND command = { }; | ||
23 | IBAFunctions* pBAFunctions = NULL; | ||
24 | |||
25 | args.cbSize = sizeof(args); | ||
26 | args.pEngine = pEngine; | ||
27 | args.pCommand = &command; | ||
28 | |||
29 | results.cbSize = sizeof(results); | ||
30 | |||
31 | try | ||
32 | { | ||
33 | BalInitialize(pEngine); | ||
34 | |||
35 | hr = CreateBAFunctions(NULL, &args, &results); | ||
36 | NativeAssert::Succeeded(hr, "Failed to create BAFunctions."); | ||
37 | |||
38 | pBAFunctions = reinterpret_cast<IBAFunctions*>(results.pvBAFunctionsProcContext); | ||
39 | } | ||
40 | finally | ||
41 | { | ||
42 | ReleaseObject(pEngine); | ||
43 | ReleaseObject(pBAFunctions); | ||
44 | } | ||
45 | } | ||
46 | }; | ||
47 | } | ||