import * as React from 'react';
import {mount} from 'enzyme';
import {DialogModule, DialogModuleDefinitions} from '../DialogModule';
import {DialogProvider} from '../DialogProvider';
import {DialogProviderImpl} from './DialogProviderImpl';
import {TestAdaptor} from '../../../adaptors/framework/_tests/TestAdaptor';

describe('DialogModuleTesting', () => {
    const testAdaptor: TestAdaptor = new TestAdaptor();
    const dialogProvider: DialogProvider = new DialogProviderImpl();
    const defaultTestModuleProps : DialogModuleDefinitions.Props = new DialogModuleDefinitions.Props(
        testAdaptor, dialogProvider);

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

});
