"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");
describe('Cdm/ManifestDefinitionTests', () => {
    /**
     * Tests if the copy function creates copies of the sub objects
     */
    it('testManifestCopy', () => {
        const corpus = new internal_1.CdmCorpusDefinition();
        const manifest = new internal_1.CdmManifestDefinition(corpus.ctx, 'name');
        const entityName = 'entity';
        const subManifestName = 'subManifest';
        const relationshipName = 'relName';
        const traitName = "traitName";
        const entityDec = manifest.entities.push(entityName);
        const subManifest = manifest.subManifests.push(subManifestName);
        const relationship = manifest.relationships.push(relationshipName);
        const trait = manifest.exhibitsTraits.push(traitName);
        const copy = manifest.copy();
        copy.entities.allItems[0].entityName = 'newEntity';
        copy.subManifests.allItems[0].manifestName = 'newSubManifest';
        copy.relationships.allItems[0].name = 'newRelName';
        copy.exhibitsTraits.allItems[0].namedReference = 'newTraitName';
        expect(entityDec.entityName)
            .toBe(entityName);
        expect(subManifest.manifestName)
            .toBe(subManifestName);
        expect(relationship.name)
            .toBe(relationshipName);
        expect(trait.namedReference)
            .toBe(traitName);
    });
});
//# sourceMappingURL=ManifestDefinition.test.js.map