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

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) => {
                    done(e);
                })
        });
});

it("#01. should success when create etl for dim-division", function (done) {
    instanceManager.run()
        .then((a) => {
            done();
        })
        .catch((e) => {
            done(e);
        });
});

@@ -672,16 +672,19 @@
 );%0A%7D);%0A%0A
+// 
 it(%22#01.
@@ -748,24 +748,27 @@
 on (done) %7B%0A
+// 
     instance
@@ -781,16 +781,19 @@
 r.run()%0A
+// 
         
@@ -803,24 +803,283 @@
 en((a) =%3E %7B%0A
+//             done();%0A//         %7D)%0A//         .catch((e) =%3E %7B%0A//             done(e);%0A//         %7D);%0A// %7D);%0A%0A%0Avar data = %5B%7B%7D, %7B%7D%5D;%0A%0Ait(%22#02. should success when transforming data%22, function (done) %7B%0A    instanceManager.transform(data)%0A        .then(() =%3E %7B%0A
             

update etl