"use strict";
/*
 *  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *  SPDX-License-Identifier: Apache-2.0
 */
Object.defineProperty(exports, "__esModule", { value: true });
const errors_1 = require("../errors");
const roleUtils_1 = require("./roleUtils");
describe('Test roleUtilities', () => {
    describe('getITAdmin', () => {
        test('returns ITAdmin role', () => {
            expect((0, roleUtils_1.getITAdminRole)()).toEqual('ITAdmin');
        });
    });
    const VALID_PROJECT_ID = 'proj-123';
    const INVALID_PROJECT_ID = 'notValidProject';
    describe('getProjectAdminRole', () => {
        test('returns ProjectAdmin Role when given valid ProjectID', () => {
            expect((0, roleUtils_1.getProjectAdminRole)(VALID_PROJECT_ID)).toEqual('proj-123#ProjectAdmin');
        });
        test('throws InvalidArgumentError when given invalid ProjectID', () => {
            expect(function () {
                (0, roleUtils_1.getProjectAdminRole)(INVALID_PROJECT_ID);
            }).toThrow(new errors_1.InvalidArgumentError());
        });
    });
    describe('getResearcherRole', () => {
        test('returns Researcher Role when given valid ProjectID', () => {
            expect((0, roleUtils_1.getResearcherRole)(VALID_PROJECT_ID)).toEqual('proj-123#Researcher');
        });
        test('throws InvalidArgumentError when given invalid ProjectID', () => {
            expect(function () {
                (0, roleUtils_1.getResearcherRole)(INVALID_PROJECT_ID);
            }).toThrow(new errors_1.InvalidArgumentError());
        });
    });
});
//# sourceMappingURL=roleUtils.test.js.map