All files / test dataProvider.ts

100% Statements 16/16
100% Branches 0/0
100% Functions 1/1
100% Lines 16/16

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 332x 2x 2x 2x 2x 2x   2x 2x           2x 2x   2x 2x   2x       2x   2x       2x    
import { appInstall, DEFAULT_USER } from '@orchesty/nodejs-connectors/test/DataProvider';
import { container, db, sender } from '@orchesty/nodejs-connectors/test/TestAbstract';
import CoreFormsEnum from '@orchesty/nodejs-sdk/dist/lib/Application/Base/CoreFormsEnum';
import GetResponseGetContact from '../src/Batch/GetResponseGetContact';
import GetResponseGetAccountsConnector from '../src/Connector/GetResponseGetAccountsConnector';
import GetResponseApplication, { API_KEY, NAME } from '../src/GetResponseApplication';
 
export default function init(): void {
    appInstall(NAME, DEFAULT_USER, {
        [CoreFormsEnum.AUTHORIZATION_FORM]: {
            [API_KEY]: 'api_key',
        },
    });
 
    const app = new GetResponseApplication();
    container.setApplication(app);
 
    const getAccounts = new GetResponseGetAccountsConnector();
    const getContact = new GetResponseGetContact();
 
    getAccounts
        .setSender(sender)
        .setDb(db)
        .setApplication(app);
    container.setConnector(getAccounts);
 
    getContact
        .setSender(sender)
        .setDb(db)
        .setApplication(app);
    container.setBatch(getContact);
}