/** @overview nodeunit test case. */

var testResource = require('../../../test_resource'),
    mockInjector = require('../../../mock_injector'),
    fs = require('fs'),
    path = require('path'),
    linkPrototypeFiles = require('../../../../ci/worker/link_prototype_files.js');

exports.setUp = function (done) {
    done();
};

exports.tearDown = function (done) {
    mockInjector.restoreAll();
    done();
};


exports['Do link.'] = function (test) {
    var srcDir = testResource.resolveWorkFile('work_link_prototype_files_src');
    testResource.prepareCleanWorkDirForTestFile(__filename, function (err, destDir) {
        testResource.prepareCleanWorkDir(destDir, function () {
            mockInjector.inject(linkPrototypeFiles, '_baseDir', function () {
                return destDir;
            });
            mockInjector.inject(linkPrototypeFiles, '_prototypeBaseDir', function () {
                return srcDir;
            });
            linkPrototypeFiles({

            }, function (err) {
                test.ifError(err);
                test.done();
            });
        });
    });
};
