"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 internal_1 = require("../../../internal");
const testHelper_1 = require("../../testHelper");
const projectionTestUtils_1 = require("../../Utilities/projectionTestUtils");
/**
 * Tests all the projections will not break the OM even if not implemented.
 */
describe('Cdm/Projection/ForwardCompatibility', () => {
    /**
     * The path between TestDataPath and TestName.
     */
    const testsSubpath = 'Cdm/Projection/ForwardCompatibilityTest';
    /**
     * Tests running all the projections (includes projections that are not implemented).
     */
    it('TestAllOperations', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestAllOperations';
        const entityName = testName;
        const corpus = testHelper_1.testHelper.getLocalCorpus(testsSubpath, testName);
        corpus.setEventCallback((statusLevel, message) => {
            if (message.indexOf('Projection operation not implemented yet.') === -1) {
                throw new Error(`Some unexpected failure - ${message}!`);
            }
        }, internal_1.cdmStatusLevel.error);
        yield projectionTestUtils_1.projectionTestUtils.loadEntityForResolutionOptionAndSave(corpus, testName, testsSubpath, entityName, ['referenceOnly']);
    }));
});
//# sourceMappingURL=ForwardCompatibility.test.js.map