// 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. #include "precomp.h" namespace Microsoft { namespace Tools { namespace WindowsInstallerXml { namespace Test { namespace Bootstrapper { using namespace System; using namespace Xunit; public ref class ManifestTest : BurnUnitTest { public: ManifestTest(BurnTestFixture^ fixture) : BurnUnitTest(fixture) { } [Fact] void ManifestLoadXmlTest() { HRESULT hr = S_OK; BURN_ENGINE_STATE engineState = { }; try { LPCSTR szDocument = "" " " " " " " " " " "; hr = CacheInitialize(&engineState.cache, &engineState.internalCommand); TestThrowOnFailure(hr, L"Failed initialize cache."); hr = VariableInitialize(&engineState.variables); TestThrowOnFailure(hr, L"Failed to initialize variables."); // load manifest from XML hr = ManifestLoadXmlFromBuffer((BYTE*)szDocument, lstrlenA(szDocument), &engineState); TestThrowOnFailure(hr, L"Failed to parse manifest from XML."); // check variable values Assert::True(VariableExistsHelper(&engineState.variables, L"Variable1")); } finally { //CoreUninitialize(&engineState); } } }; } } } } }