/** @overview nodeunit test case. */

var testResource = require('../../../test_resource'),
    mockInjector = require('../../../mock_injector'),
    generateDefineModelScaffold = require('../../../../task/worker/generate_define_model_scaffold.js');

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

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



exports['Generate define model files.'] = function (test) {
    var workDir = testResource.resolveWorkFile('work_generate_define_model');
    testResource.prepareCleanWorkDir(workDir, function () {
        generateDefineModelScaffold({
            settingFile: testResource.resolveMockFile('mock-define-model-settings.js'),
            destDir: workDir
        }, function (err) {
            test.ifError(err);
            test.done();
        });
    });
};