aboutsummaryrefslogtreecommitdiff
path: root/src/burn/test/BurnUnitTest/BurnTestFixture.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/burn/test/BurnUnitTest/BurnTestFixture.h')
-rw-r--r--src/burn/test/BurnUnitTest/BurnTestFixture.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/burn/test/BurnUnitTest/BurnTestFixture.h b/src/burn/test/BurnUnitTest/BurnTestFixture.h
new file mode 100644
index 00000000..103972ef
--- /dev/null
+++ b/src/burn/test/BurnUnitTest/BurnTestFixture.h
@@ -0,0 +1,75 @@
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
5namespace Microsoft
6{
7namespace Tools
8{
9namespace WindowsInstallerXml
10{
11namespace Test
12{
13namespace Bootstrapper
14{
15 using namespace System;
16 using namespace WixBuildTools::TestSupport;
17
18 public ref class BurnTestFixture : IDisposable
19 {
20 public:
21 BurnTestFixture()
22 {
23 HRESULT hr = XmlInitialize();
24 TestThrowOnFailure(hr, L"Failed to initialize XML support.");
25
26 hr = RegInitialize();
27 TestThrowOnFailure(hr, L"Failed to initialize Regutil.");
28
29 hr = CrypInitialize();
30 TestThrowOnFailure(hr, L"Failed to initialize Cryputil.");
31
32 PlatformInitialize();
33
34 this->testDirectory = WixBuildTools::TestSupport::TestData::Get();
35
36 LogInitialize(::GetModuleHandleW(NULL));
37
38 LogSetLevel(REPORT_DEBUG, FALSE);
39
40 hr = LogOpen(NULL, L"BurnUnitTest", NULL, L"txt", FALSE, FALSE, NULL);
41 TestThrowOnFailure(hr, L"Failed to open log.");
42 }
43
44 ~BurnTestFixture()
45 {
46 CrypUninitialize();
47 XmlUninitialize();
48 RegUninitialize();
49 LogUninitialize(FALSE);
50 }
51
52 property String^ DataDirectory
53 {
54 String^ get()
55 {
56 return this->testDirectory;
57 }
58 }
59
60 property String^ TestDirectory
61 {
62 String^ get()
63 {
64 return this->testDirectory;
65 }
66 }
67
68 private:
69 String^ testDirectory;
70 };
71}
72}
73}
74}
75}