/**
 * @license
 * Copyright Renobi. All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://opensource.org/licenses/MIT
 */

import { expect } from 'chai';
import { Any, MockType1 } from '../test/any';
import { getClass, getClassOrSymbol, getClassName, getContructor } from '../src/class';

describe('Class', () => {
    describe('Get Class', () => {
        it('should return prototype', () => {
            expect(getClass(MockType1.prototype)).to.equal(MockType1);
        });

        it('should return class', () => {
            expect(getClass(MockType1)).to.equal(MockType1);
            expect(getClass(new MockType1)).to.equal(MockType1);
        });
    });

    describe('Get Class Or Symbol', () => {
        it('should return symbol', () => {
            const symbol = Symbol(Any.string());
            expect(getClassOrSymbol(symbol)).to.equal(symbol);
        });
    });

    describe('Get Class Name', () => {
        it('should return constructor name', () => {
            expect(getClassName(MockType1)).to.equal('MockType1');
        });

        it('should return function name', () => {
            expect(getClassName(new MockType1())).to.equal('MockType1');
        });

        it('should return symbol string', () => {
    describe('Get Constructor', () => {
        it('should return constructor if type', () => {
            expect(getContructor(MockType1)).to.equal(MockType1);
        });

        it('should return self if function', () => {
            expect(getContructor(new MockType1())).to.equal(MockType1);
        });
    });
});
            expect(getClassName(Symbol('test:MockType1'))).to.equal('Symbol(test:MockType1)');
        });
    });
