import * as React from 'react';
import {mount} from 'enzyme';
import {InlineDialogModule, InlineDialogModuleDefinitions} from '../InlineDialogModule';
import {DefaultInlineDialogProvider} from '../DefaultInlineDialogProvider';
import {TestAdaptor} from '../../../adaptors/framework/_tests/TestAdaptor';

describe('InlineDialogModuleTesting', () => {
    const testAdaptor: TestAdaptor = new TestAdaptor();
    const inlineDialogProvider: DefaultInlineDialogProvider = new DefaultInlineDialogProvider();
    const defaultTestModuleProps : InlineDialogModuleDefinitions.Props = new InlineDialogModuleDefinitions.Props(
        testAdaptor, inlineDialogProvider);

    it('Should allow modules to be registered if the name is OK.', () : void => {
        const registeredBeforeMount = testAdaptor.isRegistered(InlineDialogModuleDefinitions.INLINE_DIALOG_MODULE_NAME);
        expect(registeredBeforeMount).toEqual(false);
        mount(<InlineDialogModule {...defaultTestModuleProps} />);
    });

});
