"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 testHelper_1 = require("../../../testHelper");
describe('Persistence.CdmFolder.ReferencedEntityDeclaration', () => {
    /// <summary>
    /// The path between TestDataPath and TestName.
    /// </summary>
    const testsSubpath = 'Persistence/CdmFolder/ReferencedEntityDeclaration';
    /**
     * Testing for folder impl instance with referenced entity declaration.
     */
    it('TestLoadReferencedEntity', () => {
        const readFile = testHelper_1.testHelper.getInputFileContent(testsSubpath, 'TestLoadReferencedEntity', 'entities.manifest.cdm.json');
        const cdmManifest = Persistence_1.CdmFolder.ManifestPersistence.fromObject(new internal_1.resolveContext(new internal_1.CdmCorpusDefinition(), undefined), '', '', '', JSON.parse(readFile));
        expect(cdmManifest.entities.length)
            .toBe(1);
        expect(cdmManifest.entities.allItems[0].getObjectType())
            .toBe(internal_1.cdmObjectType.referencedEntityDeclarationDef);
        const entity = cdmManifest.entities.allItems[0];
        expect(entity.entityName)
            .toBe('testEntity');
        expect(entity.explanation)
            .toBe('test explanation');
        expect(entity.entityPath)
            .toBe('testPath');
        expect(entity.exhibitsTraits.length)
            .toBe(1);
    });
});
//# sourceMappingURL=ReferencedEntityDeclarationImpl.test.js.map