var helper = require("../../../helper");
var sqlHelper = require("../../../sql-helper");
var Manager = require("../../../../src/etl/dim/dim-staff-etl-manager");
var instanceManager = null;
var should = require("should");

before("#00. connect db", function (done) {
    Promise.all([helper, sqlHelper])
        .then((result) => {
            var db = result[0];
            var sql = result[1];
            db.getDb().then((db) => {
                instanceManager = new Manager(db, {
                    username: "unit-test"
                }, sql);
                done();
            })
                .catch((e) => {
        });
});

it("#01. should success when run etl dim staff", function (done) {
    instanceManager.run()
        .then(() => {
            done();
        })
        .catch((e) => {
            console.log(e);
            done(e);
        });
});
                    done(e);
                })