"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
const internal_1 = require("../../../../internal");
const Persistence_1 = require("../../../../Persistence");
const resolveContext_1 = require("../../../../Utilities/resolveContext");
const testHelper_1 = require("../../../testHelper");
describe('Persistence.CdmFolder.FolderDeclaration', () => {
    /// <summary>
    /// The path between TestDataPath and TestName.
    /// </summary>
    const testsSubpath = 'Persistence/CdmFolder/FolderDeclaration';
    /**
     * Testing for folder impl instance with subfolders
     */
    it('TestLoadFolderWithSubFolders', () => {
        const content = testHelper_1.testHelper.getInputFileContent(testsSubpath, 'TestLoadFolderWithSubFolders', 'subManifest.manifest.cdm.json');
        const context = new resolveContext_1.resolveContext(new internal_1.CdmCorpusDefinition(), undefined);
        const cdmManifest = Persistence_1.CdmFolder.ManifestPersistence.fromObject(context, 'testEntity', 'testNamespace', '/', JSON.parse(content));
        expect(cdmManifest.subManifests.length)
            .toEqual(1);
        const subManifest = cdmManifest.subManifests.allItems[0];
        expect(subManifest.getName())
            .toEqual('sub folder declaration');
        expect(subManifest.explanation)
            .toEqual('test sub explanation');
        expect(subManifest.definition)
            .toEqual('test definition');
    });
});
//# sourceMappingURL=FolderDeclarationTest.test.js.map