main
h 75 lines 1.73 KB
Raw
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
5 namespace Microsoft
6 {
7 namespace Tools
8 {
9 namespace WindowsInstallerXml
10 {
11 namespace Test
12 {
13 namespace Bootstrapper
14 {
15 using namespace System;
16 using namespace WixInternal::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 = WixInternal::TestSupport::TestData::Get();
35
36 LogInitialize(::GetModuleHandleW(L"BurnUnitTest.dll"));
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 }