"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 ObjectValidator_1 = require("../../Utilities/ObjectValidator");
const CommonTest_1 = require("./CommonTest");
// tslint:disable:max-func-body-length
// tslint:disable:variable-name
describe('Cdm.ResolutionGuidancePolymorphism', () => {
    /**
     * Resolution Guidance Test - Polymorphism
     */
    it('TestPolymorphism', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestPolymorphism';
        {
            const entityName = 'Customer';
            // Refer to bug https://powerbi.visualstudio.com/Power%20Query/_workitems/edit/327155
            const expectedContext_default = undefined;
            const expectedContext_normalized = undefined;
            const expectedContext_referenceOnly = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_structured = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_normalized_structured = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_referenceOnly_normalized = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_referenceOnly_structured = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_referenceOnly_normalized_structured = new ObjectValidator_1.AttributeContextExpectedValue();
            // Refer to bug https://powerbi.visualstudio.com/Power%20Query/_workitems/edit/327155
            const expected_default = undefined;
            const expected_normalized = undefined;
            const expected_referenceOnly = [];
            const expected_structured = [];
            const expected_normalized_structured = [];
            const expected_referenceOnly_normalized = [];
            const expected_referenceOnly_structured = [];
            const expected_referenceOnly_normalized_structured = [];
            yield CommonTest_1.CommonTest.runTestWithValues(testName, entityName, expectedContext_default, expectedContext_normalized, expectedContext_referenceOnly, expectedContext_structured, expectedContext_normalized_structured, expectedContext_referenceOnly_normalized, expectedContext_referenceOnly_structured, expectedContext_referenceOnly_normalized_structured, expected_default, expected_normalized, expected_referenceOnly, expected_structured, expected_normalized_structured, expected_referenceOnly_normalized, expected_referenceOnly_structured, expected_referenceOnly_normalized_structured);
        }
    }));
    /**
     * Resolution Guidance Test - Polymorphism With AttributeGroupRef
     */
    it('TestPolymorphismWithAttributeGroupRef', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestPolymorphismWithAttributeGroupRef';
        {
            const entityName = 'Customer';
            // Refer to bug https://powerbi.visualstudio.com/Power%20Query/_workitems/edit/327155
            const expectedContext_default = undefined;
            const expectedContext_normalized = undefined;
            const expectedContext_referenceOnly = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_structured = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_normalized_structured = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_referenceOnly_normalized = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_referenceOnly_structured = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_referenceOnly_normalized_structured = new ObjectValidator_1.AttributeContextExpectedValue();
            // Refer to bug https://powerbi.visualstudio.com/Power%20Query/_workitems/edit/327155
            const expected_default = undefined;
            const expected_normalized = undefined;
            const expected_referenceOnly = [];
            const expected_structured = [];
            const expected_normalized_structured = [];
            const expected_referenceOnly_normalized = [];
            const expected_referenceOnly_structured = [];
            const expected_referenceOnly_normalized_structured = [];
            yield CommonTest_1.CommonTest.runTestWithValues(testName, entityName, expectedContext_default, expectedContext_normalized, expectedContext_referenceOnly, expectedContext_structured, expectedContext_normalized_structured, expectedContext_referenceOnly_normalized, expectedContext_referenceOnly_structured, expectedContext_referenceOnly_normalized_structured, expected_default, expected_normalized, expected_referenceOnly, expected_structured, expected_normalized_structured, expected_referenceOnly_normalized, expected_referenceOnly_structured, expected_referenceOnly_normalized_structured);
        }
    }));
    /**
     * Resolution Guidance Test - Polymorphism With Rename As Member
     */
    it('TestPolymorphismWithRenameAsMember', () => __awaiter(void 0, void 0, void 0, function* () {
        const testName = 'TestPolymorphismWithRenameAsMember';
        {
            const entityName = 'Customer';
            // Refer to bug https://powerbi.visualstudio.com/Power%20Query/_workitems/edit/327155
            const expectedContext_default = undefined;
            const expectedContext_normalized = undefined;
            const expectedContext_referenceOnly = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_structured = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_normalized_structured = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_referenceOnly_normalized = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_referenceOnly_structured = new ObjectValidator_1.AttributeContextExpectedValue();
            const expectedContext_referenceOnly_normalized_structured = new ObjectValidator_1.AttributeContextExpectedValue();
            // Refer to bug https://powerbi.visualstudio.com/Power%20Query/_workitems/edit/327155
            const expected_default = [];
            const expected_normalized = [];
            const expected_referenceOnly = [];
            const expected_structured = [];
            const expected_normalized_structured = [];
            const expected_referenceOnly_normalized = [];
            const expected_referenceOnly_structured = [];
            const expected_referenceOnly_normalized_structured = [];
            yield CommonTest_1.CommonTest.runTestWithValues(testName, entityName, expectedContext_default, expectedContext_normalized, expectedContext_referenceOnly, expectedContext_structured, expectedContext_normalized_structured, expectedContext_referenceOnly_normalized, expectedContext_referenceOnly_structured, expectedContext_referenceOnly_normalized_structured, expected_default, expected_normalized, expected_referenceOnly, expected_structured, expected_normalized_structured, expected_referenceOnly_normalized, expected_referenceOnly_structured, expected_referenceOnly_normalized_structured);
        }
    }));
});
//# sourceMappingURL=ResolutionGuidancePolymorphism.test.js.map