"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
const Storage_1 = require("../../../Storage");
const testHelper_1 = require("../../testHelper");
const internal_1 = require("../../../internal");
const projectionTestUtils_1 = require("../../Utilities/projectionTestUtils");
/**
 *  Class to handle AlterTraits operations
 */
describe('Cdm/Projection/TestProjectionAlterTraits', () => {
    /**
     * The path between TestDataPath and TestName.
     */
    const testsSubpath = 'Cdm/Projection/ProjectionAlterTraitsTest';
    const traitGroupFilePath = testHelper_1.testHelper.testDataPath + '/Cdm/Projection/ProjectionAlterTraitsTest';
    /**
     * All possible combinations of the different resolution directives
     */
    const resOptsCombinations = [
        [],
        ['referenceOnly'],
        ['normalized'],
        ['structured'],
        ['referenceOnly', 'normalized'],
        ['referenceOnly', 'structured'],
        ['normalized', 'structured'],
        ['referenceOnly', 'normalized', 'structured']
    ];
    /**
     * Test AlterTraits on an type attribute.
     */
    it('TestAlterTraitsOnTypeAttrProj', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestAlterTraitsOnTypeAttrProj';
        const entityName = 'NewPerson';
        const corpus = testHelper_1.testHelper.getLocalCorpus(testsSubpath, testName);
        corpus.storage.mount('traitGroup', new Storage_1.LocalAdapter(traitGroupFilePath));
        for (const resOpt of resOptsCombinations) {
            yield projectionTestUtils_1.projectionTestUtils.loadEntityForResolutionOptionAndSave(corpus, testName, testsSubpath, entityName, resOpt);
        }
        const entity = yield corpus.fetchObjectAsync(`local:/${entityName}.cdm.json/${entityName}`);
        const resolvedEntity = yield projectionTestUtils_1.projectionTestUtils.getResolvedEntity(corpus, entity, []);
        expect(resolvedEntity.attributes.length)
            .toEqual(1);
        validateTrait(resolvedEntity.attributes.allItems[0], 'FavoriteTerm', true);
    }));
    /**
     * Test AlterTraits on an entity attribute.
     */
    it('TestAlterTraitsOnEntiAttrProj', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestAlterTraitsOnEntiAttrProj';
        const entityName = 'NewPerson';
        const corpus = testHelper_1.testHelper.getLocalCorpus(testsSubpath, testName);
        corpus.storage.mount('traitGroup', new Storage_1.LocalAdapter(traitGroupFilePath));
        for (const resOpt of resOptsCombinations) {
            yield projectionTestUtils_1.projectionTestUtils.loadEntityForResolutionOptionAndSave(corpus, testName, testsSubpath, entityName, resOpt);
        }
        const entity = yield corpus.fetchObjectAsync(`local:/${entityName}.cdm.json/${entityName}`);
        const resolvedEntity = yield projectionTestUtils_1.projectionTestUtils.getResolvedEntity(corpus, entity, []);
        expect(resolvedEntity.attributes.length)
            .toEqual(5);
        validateTrait(resolvedEntity.attributes.allItems[0], 'name', true);
        validateTrait(resolvedEntity.attributes.allItems[1], 'age');
        validateTrait(resolvedEntity.attributes.allItems[2], 'address');
        validateTrait(resolvedEntity.attributes.allItems[3], 'phoneNumber');
        validateTrait(resolvedEntity.attributes.allItems[4], 'email');
    }));
    /**
     * Test AlterTraits on an entity group.
     */
    it('TestAlterTraitsOnAttrGrpProj', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestAlterTraitsOnAttrGrpProj';
        const entityName = 'NewPerson';
        const corpus = testHelper_1.testHelper.getLocalCorpus(testsSubpath, testName);
        corpus.storage.mount('traitGroup', new Storage_1.LocalAdapter(traitGroupFilePath));
        for (const resOpt of resOptsCombinations) {
            yield projectionTestUtils_1.projectionTestUtils.loadEntityForResolutionOptionAndSave(corpus, testName, testsSubpath, entityName, resOpt);
        }
        const entity = yield corpus.fetchObjectAsync(`local:/${entityName}.cdm.json/${entityName}`);
        const resolvedEntity = yield projectionTestUtils_1.projectionTestUtils.getResolvedEntity(corpus, entity, []);
        const attGroupReference = resolvedEntity.attributes.allItems[0];
        const attGroupDefinition = attGroupReference.explicitReference;
        expect(attGroupDefinition.members.length)
            .toEqual(5);
        expect(attGroupDefinition.attributeGroupName)
            .toEqual('PersonAttributeGroup');
        expect(attGroupDefinition.exhibitsTraits.item('means.TraitG100')).not.toBeUndefined();
        expect(attGroupDefinition.exhibitsTraits.item('means.TraitG200')).not.toBeUndefined();
        expect(attGroupDefinition.exhibitsTraits.item('means.TraitG300')).toBeUndefined();
        expect(attGroupDefinition.exhibitsTraits.item('means.TraitG400')).not.toBeUndefined();
        const traitG4 = attGroupDefinition.exhibitsTraits.item('means.TraitG4');
        expect(traitG4)
            .not
            .toBeUndefined();
        expect(traitG4.arguments.fetchValue('precision'))
            .toEqual('5');
        expect(traitG4.arguments.fetchValue('scale'))
            .toEqual('15');
    }));
    /**
     * Test AlterTraits operation nested with IncludeAttributes and RenameAttribute.
     */
    it('TestCombineOpsNestedProj', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestCombineOpsNestedProj';
        const entityName = 'NewPerson';
        const corpus = testHelper_1.testHelper.getLocalCorpus(testsSubpath, testName);
        corpus.storage.mount('traitGroup', new Storage_1.LocalAdapter(traitGroupFilePath));
        for (const resOpt of resOptsCombinations) {
            yield projectionTestUtils_1.projectionTestUtils.loadEntityForResolutionOptionAndSave(corpus, testName, testsSubpath, entityName, resOpt);
        }
        const entity = yield corpus.fetchObjectAsync(`local:/${entityName}.cdm.json/${entityName}`);
        const resolvedEntity = yield projectionTestUtils_1.projectionTestUtils.getResolvedEntity(corpus, entity, []);
        // Include attributes: ["age", "phoneNumber", "name"]
        // Add attribute: ["newName"]
        // alter traits on ["newName", "name", + { "means.TraitG100" , "JobTitleBase" } - { "means.TraitG300" } ]
        // Rename attribute ["newName" -> "renaming-{m}" ]
        // alter traits on ["renaming-newName", + { "means.TraitG4(precision:5, scale:15)" } ]
        expect(resolvedEntity.attributes.length)
            .toEqual(4);
        validateTrait(resolvedEntity.attributes.allItems[0], 'age', false, true);
        validateTrait(resolvedEntity.attributes.allItems[1], 'phoneNumber', false, true);
        validateTrait(resolvedEntity.attributes.allItems[2], 'name');
        validateTrait(resolvedEntity.attributes.allItems[3], 'renaming-newName', true);
    }));
    /**
     * Test AlterTraits operation with a 'structured' condition
     */
    it('TestConditionalProj', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestConditionalProj';
        const entityName = 'NewPerson';
        const corpus = testHelper_1.testHelper.getLocalCorpus(testsSubpath, testName);
        corpus.storage.mount('traitGroup', new Storage_1.LocalAdapter(traitGroupFilePath));
        for (const resOpt of resOptsCombinations) {
            yield projectionTestUtils_1.projectionTestUtils.loadEntityForResolutionOptionAndSave(corpus, testName, testsSubpath, entityName, resOpt);
        }
        const entity = yield corpus.fetchObjectAsync(`local:/${entityName}.cdm.json/${entityName}`);
        const resolvedEntity = yield projectionTestUtils_1.projectionTestUtils.getResolvedEntity(corpus, entity, ['referenceOnly']);
        // Original set of attributes: ['name', 'age', 'address', 'phoneNumber', 'email']
        // Condition not met, no traits are added
        expect(resolvedEntity.attributes.length)
            .toEqual(5);
        validateTrait(resolvedEntity.attributes.allItems[0], 'name', false, true);
        validateTrait(resolvedEntity.attributes.allItems[1], 'age', false, true);
        validateTrait(resolvedEntity.attributes.allItems[2], 'address', false, true);
        validateTrait(resolvedEntity.attributes.allItems[3], 'phoneNumber', false, true);
        validateTrait(resolvedEntity.attributes.allItems[4], 'email', false, true);
        const resolvedEntity2 = yield projectionTestUtils_1.projectionTestUtils.getResolvedEntity(corpus, entity, ['structured']);
        // Original set of attributes: ['name', 'age', 'address', 'phoneNumber', 'email']
        // Condition met, new traits are added
        expect(resolvedEntity2.attributes.length)
            .toEqual(5);
        validateTrait(resolvedEntity2.attributes.allItems[0], 'name', true);
        validateTrait(resolvedEntity2.attributes.allItems[1], 'age');
        validateTrait(resolvedEntity2.attributes.allItems[2], 'address');
        validateTrait(resolvedEntity2.attributes.allItems[3], 'phoneNumber');
        validateTrait(resolvedEntity2.attributes.allItems[4], 'email');
    }));
    /**
     * Test for creating a projection with an AlterTraits operation and a condition using the object model
     */
    it('TestConditionalProjUsingObjectModel', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestConditionalProjUsingObjectModel';
        const corpus = testHelper_1.testHelper.getLocalCorpus(testsSubpath, testName);
        const localRoot = corpus.storage.fetchRootFolder('local');
        corpus.storage.mount('traitGroup', new Storage_1.LocalAdapter(traitGroupFilePath));
        // Create an entity.
        const entity = projectionTestUtils_1.projectionTestUtils.createEntity(corpus, localRoot);
        entity.inDocument.imports.push('traitGroup:/TraitGroup.cdm.json');
        // Create a projection with a condition that states the operation should only execute when the resolution directive is 'structured'.
        const projection = projectionTestUtils_1.projectionTestUtils.createProjection(corpus, localRoot);
        projection.condition = 'structured==true';
        projection.runSequentially = true;
        // Create an AlterTraits operation
        const alterTraitsOp_1 = corpus.MakeObject(internal_1.cdmObjectType.operationAlterTraitsDef);
        alterTraitsOp_1.traitsToAdd = [];
        alterTraitsOp_1.traitsToAdd.push(corpus.MakeRef(internal_1.cdmObjectType.traitRef, 'means.TraitG100', true));
        alterTraitsOp_1.traitsToAdd.push(corpus.MakeRef(internal_1.cdmObjectType.traitGroupRef, 'JobTitleBase', true));
        alterTraitsOp_1.traitsToRemove = [];
        alterTraitsOp_1.traitsToRemove.push(corpus.MakeRef(internal_1.cdmObjectType.traitRef, 'means.TraitG300', true));
        projection.operations.push(alterTraitsOp_1);
        const alterTraitsOp_2 = corpus.MakeObject(internal_1.cdmObjectType.operationAlterTraitsDef);
        alterTraitsOp_2.traitsToAdd = [];
        const traitG4 = corpus.MakeRef(internal_1.cdmObjectType.traitRef, 'means.TraitG4', true);
        traitG4.arguments.push('precision', '5');
        traitG4.arguments.push('scale', '15');
        alterTraitsOp_2.traitsToAdd.push(traitG4);
        alterTraitsOp_2.applyTo = ['name'];
        projection.operations.push(alterTraitsOp_2);
        // Create an entity reference to hold this projection.
        const projectionEntityRef = corpus.MakeObject(internal_1.cdmObjectType.entityRef, null);
        projectionEntityRef.explicitReference = projection;
        // Create an entity attribute that contains this projection and add this to the entity.
        const entityAttribute = corpus.MakeObject(internal_1.cdmObjectType.entityAttributeDef, 'TestEntityAttribute');
        entityAttribute.entity = projectionEntityRef;
        entity.attributes.push(entityAttribute);
        // Create resolution options with the 'referenceOnly' directive.
        const resOpt = new internal_1.resolveOptions(entity.inDocument);
        resOpt.directives = new internal_1.AttributeResolutionDirectiveSet(new Set(['referenceOnly']));
        // Resolve the entity with 'referenceOnly'
        const resolvedEntityWithReferenceOnly = yield entity.createResolvedEntityAsync(`Resolved_${entity.entityName}.cdm.json`, resOpt, localRoot);
        // Original set of attributes: ['id', 'name', 'value', 'date']
        // Condition not met, no traits are added
        expect(resolvedEntityWithReferenceOnly.attributes.length)
            .toEqual(4);
        validateTrait(resolvedEntityWithReferenceOnly.attributes.allItems[0], 'id', false, true);
        validateTrait(resolvedEntityWithReferenceOnly.attributes.allItems[1], 'name', false, true);
        validateTrait(resolvedEntityWithReferenceOnly.attributes.allItems[2], 'value', false, true);
        validateTrait(resolvedEntityWithReferenceOnly.attributes.allItems[3], 'date', false, true);
        // Now resolve the entity with the 'structured' directive
        resOpt.directives = new internal_1.AttributeResolutionDirectiveSet(new Set(['structured']));
        const resolvedEntityWithStructured = yield entity.createResolvedEntityAsync(`Resolved_${entity.entityName}.cdm.json`, resOpt, localRoot);
        // Verify correctness of the resolved attributes after running the AddAttributeGroup operation
        // Condition met, new traits are added
        expect(resolvedEntityWithStructured.attributes.length)
            .toEqual(4);
        validateTrait(resolvedEntityWithStructured.attributes.allItems[0], 'id');
        validateTrait(resolvedEntityWithStructured.attributes.allItems[1], 'name', true);
        validateTrait(resolvedEntityWithStructured.attributes.allItems[2], 'value');
        validateTrait(resolvedEntityWithStructured.attributes.allItems[3], 'date');
    }));
    /**
     * Test AlterTraits operation on an extended entity definition.
     */
    it('TestExtendsEntityProj', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestExtendsEntityProj';
        const entityName = 'Child';
        const corpus = testHelper_1.testHelper.getLocalCorpus(testsSubpath, testName);
        corpus.storage.mount('traitGroup', new Storage_1.LocalAdapter(traitGroupFilePath));
        for (const resOpt of resOptsCombinations) {
            yield projectionTestUtils_1.projectionTestUtils.loadEntityForResolutionOptionAndSave(corpus, testName, testsSubpath, entityName, resOpt);
        }
        const entity = yield corpus.fetchObjectAsync(`local:/${entityName}.cdm.json/${entityName}`);
        const resolvedEntity = yield projectionTestUtils_1.projectionTestUtils.getResolvedEntity(corpus, entity, []);
        // Original set of attributes: ['name', 'age', 'address', 'phoneNumber', 'email']
        expect(resolvedEntity.attributes.length)
            .toEqual(5);
        validateTrait(resolvedEntity.attributes.allItems[0], 'name', true);
        validateTrait(resolvedEntity.attributes.allItems[1], 'age');
        validateTrait(resolvedEntity.attributes.allItems[2], 'address');
        validateTrait(resolvedEntity.attributes.allItems[3], 'phoneNumber');
        validateTrait(resolvedEntity.attributes.allItems[4], 'email');
    }));
    /**
     * Multiple AlterTraits operations on the same projection.
     */
    it('TestMultipleOpProj', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestMultipleOpProj';
        const entityName = 'NewPerson';
        const corpus = testHelper_1.testHelper.getLocalCorpus(testsSubpath, testName);
        corpus.storage.mount('traitGroup', new Storage_1.LocalAdapter(traitGroupFilePath));
        for (const resOpt of resOptsCombinations) {
            yield projectionTestUtils_1.projectionTestUtils.loadEntityForResolutionOptionAndSave(corpus, testName, testsSubpath, entityName, resOpt);
        }
        const entity = yield corpus.fetchObjectAsync(`local:/${entityName}.cdm.json/${entityName}`);
        const resolvedEntity = yield projectionTestUtils_1.projectionTestUtils.getResolvedEntity(corpus, entity, []);
        // Original set of attributes: ['name', 'age', 'address', 'phoneNumber', 'email']
        expect(resolvedEntity.attributes.length)
            .toEqual(5);
        validateTrait(resolvedEntity.attributes.allItems[0], 'name');
        validateTrait(resolvedEntity.attributes.allItems[1], 'age');
        validateTrait(resolvedEntity.attributes.allItems[2], 'address');
        validateTrait(resolvedEntity.attributes.allItems[3], 'phoneNumber');
        validateTrait(resolvedEntity.attributes.allItems[4], 'email');
    }));
    /**
     * Test argumentsContainWildcards field in AlterTraits with ArrayExpansion and RenameAttributes operations.
     */
    it('TestWildcardArgs', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestWildcardArgs';
        const entityName = 'ThreeMusketeers';
        const corpus = testHelper_1.testHelper.getLocalCorpus(testsSubpath, testName);
        for (const resOpt of resOptsCombinations) {
            yield projectionTestUtils_1.projectionTestUtils.loadEntityForResolutionOptionAndSave(corpus, testName, testsSubpath, entityName, resOpt);
        }
        const entity = yield corpus.fetchObjectAsync(`local:/${entityName}.cdm.json/${entityName}`);
        const resolvedEntity = yield projectionTestUtils_1.projectionTestUtils.getResolvedEntity(corpus, entity, []);
        // Original set of attributes: ["name", "age", "address"]
        // Expand 1...3, renameFormat = {m}{o}
        // Add traits with wildcard characters
        expect(resolvedEntity.attributes.length)
            .toEqual(9);
        projectionTestUtils_1.projectionTestUtils.validateExpansionInfoTrait(resolvedEntity.attributes.allItems[0], "name1", 1, "ThreePeople", "name");
        projectionTestUtils_1.projectionTestUtils.validateExpansionInfoTrait(resolvedEntity.attributes.allItems[1], "age1", 1, "ThreePeople", "age");
        projectionTestUtils_1.projectionTestUtils.validateExpansionInfoTrait(resolvedEntity.attributes.allItems[2], "address1", 1, "ThreePeople", "address");
        projectionTestUtils_1.projectionTestUtils.validateExpansionInfoTrait(resolvedEntity.attributes.allItems[3], "name2", 2, "ThreePeople", "name");
        projectionTestUtils_1.projectionTestUtils.validateExpansionInfoTrait(resolvedEntity.attributes.allItems[4], "age2", 2, "ThreePeople", "age");
        projectionTestUtils_1.projectionTestUtils.validateExpansionInfoTrait(resolvedEntity.attributes.allItems[5], "address2", 2, "ThreePeople", "address");
        projectionTestUtils_1.projectionTestUtils.validateExpansionInfoTrait(resolvedEntity.attributes.allItems[6], "name3", 3, "ThreePeople", "name");
        projectionTestUtils_1.projectionTestUtils.validateExpansionInfoTrait(resolvedEntity.attributes.allItems[7], "age3", 3, "ThreePeople", "age");
        projectionTestUtils_1.projectionTestUtils.validateExpansionInfoTrait(resolvedEntity.attributes.allItems[8], "address3", 3, "ThreePeople", "address");
    }));
    /**
     * Test alter arguments.
     */
    it('TestAlterArguments', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestAlterArguments';
        const entityName = 'NewPerson';
        const corpus = testHelper_1.testHelper.getLocalCorpus(testsSubpath, testName);
        corpus.storage.mount('traitGroup', new Storage_1.LocalAdapter(traitGroupFilePath));
        for (const resOpt of resOptsCombinations) {
            yield projectionTestUtils_1.projectionTestUtils.loadEntityForResolutionOptionAndSave(corpus, testName, testsSubpath, entityName, resOpt);
        }
        const entity = yield corpus.fetchObjectAsync(`local:/${entityName}.cdm.json/${entityName}`);
        const resolvedEntity = yield projectionTestUtils_1.projectionTestUtils.getResolvedEntity(corpus, entity, []);
        // Create resolution options with the 'referenceOnly' directive.
        const resolvedEntityWithReferenceOnly = yield projectionTestUtils_1.projectionTestUtils.getResolvedEntity(corpus, entity, ['referenceOnly']);
        // Original set of attributes: ["name", "age", "address[means.TraitG4(scale:15)]" , "phoneNumber", "email"]
        // Condition not met, no trait is changed
        expect(resolvedEntityWithReferenceOnly.attributes.allItems[2].name)
            .toEqual('address');
        const traitG4 = resolvedEntityWithReferenceOnly.attributes.allItems[2].appliedTraits.item('means.TraitG4');
        expect(traitG4)
            .not
            .toBeUndefined();
        expect(traitG4.arguments.fetchValue('precision'))
            .toBeUndefined();
        expect(traitG4.arguments.fetchValue('scale'))
            .toEqual('15');
        // Create resolution options with the 'structured' directive.
        const resolvedEntityWithStructured = yield projectionTestUtils_1.projectionTestUtils.getResolvedEntity(corpus, entity, ['structured']);
        // Original set of attributes: ["name", "age", "address[means.TraitG4(scale:15)]" , "phoneNumber", "email"]
        // Condition met, alter traits on ["address", + { "means.TraitG4, "arguments": ["6", {"name": "scale","value": "20"}"] }]
        expect(resolvedEntityWithStructured.attributes.allItems[2].name)
            .toEqual('address');
        const traitG4_1 = resolvedEntityWithStructured.attributes.allItems[2].appliedTraits.item('means.TraitG4');
        expect(traitG4_1)
            .not
            .toBeUndefined();
        expect(traitG4_1.arguments.fetchValue('precision'))
            .toEqual('6');
        expect(traitG4_1.arguments.fetchValue('scale'))
            .toEqual('20');
        // Create resolution options with the 'normalized' directive.
        const resolvedEntityWithNormalized = yield projectionTestUtils_1.projectionTestUtils.getResolvedEntity(corpus, entity, ['normalized']);
        // Original set of attributes: ["name", "age", "address[means.TraitG4(scale:15)]" , "phoneNumber", "email"]
        // Condition met, alter traits on ["address", + { "means.TraitG4, "arguments": ["8", null] }]
        expect(resolvedEntityWithNormalized.attributes.allItems[2].name)
            .toEqual('address');
        const traitG4_2 = resolvedEntityWithNormalized.attributes.allItems[2].appliedTraits.item('means.TraitG4');
        expect(traitG4_2)
            .not
            .toBeUndefined();
        expect(traitG4_2.arguments.fetchValue('precision'))
            .toEqual('8');
        expect(traitG4_2.arguments.fetchValue('scale'))
            .toBeUndefined();
    }));
    function validateTrait(attribute, expectedAttrName, haveTraitG4, doesNotExist) {
        expect(attribute.name)
            .toEqual(expectedAttrName);
        if (!doesNotExist) {
            expect(attribute.appliedTraits.item('means.TraitG100'))
                .not
                .toBeUndefined();
            expect(attribute.appliedTraits.item('means.TraitG200'))
                .not
                .toBeUndefined();
            expect(attribute.appliedTraits.item('means.TraitG300'))
                .toBeUndefined();
            expect(attribute.appliedTraits.item('means.TraitG400'))
                .not
                .toBeUndefined();
            if (haveTraitG4 === true) {
                const traitG4 = attribute.appliedTraits.item('means.TraitG4');
                expect(traitG4)
                    .not
                    .toBeUndefined();
                expect(traitG4.arguments.fetchValue('precision'))
                    .toEqual('5');
                expect(traitG4.arguments.fetchValue('scale'))
                    .toEqual('15');
            }
        }
        else {
            expect(attribute.appliedTraits.item('means.TraitG100'))
                .toBeUndefined();
            expect(attribute.appliedTraits.item('means.TraitG200'))
                .toBeUndefined();
            expect(attribute.appliedTraits.item('means.TraitG300'))
                .toBeUndefined();
            expect(attribute.appliedTraits.item('means.TraitG400'))
                .toBeUndefined();
            expect(attribute.appliedTraits.item('means.TraitG4'))
                .toBeUndefined();
        }
    }
});
//# sourceMappingURL=ProjectionAlterTraits.test.js.map