/**
 * @overview nodeunit test case.
 * @author "ci.worker.generateFileConfigHelper"
 */

var testResource = require('../../../test_resource'),
    mockInjector = require('../../../mock_injector'),
    fs = require('fs'),
    fileConfigHelper = require('../../../../ci/helpers/file_config_helper.js');

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

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

exports['Create new file config.'] = function (test) {
    var f = fileConfigHelper,
        existsSync = fs.existsSync;
    test.ok(existsSync(f.newApemanfileJsFile({})._tmpl), 'ApemanfileJs should exists.');
    test.ok(existsSync(f.newLICENSEFile({})._tmpl), 'LICENSE should exists.');
    test.ok(existsSync(f.newVERSIONFile({})._tmpl), 'VERSION should exists.');
    test.ok(existsSync(f.newReleaseBinFile({})._tmpl), 'ReleaseBin should exists.');
    test.ok(existsSync(f.newTaskBinFile({})._tmpl), 'TaskBin should exists.');
    test.ok(existsSync(f.newGitignoreFile({})._tmpl), 'Gitignore should exists.');
    test.ok(existsSync(f.newDocIndexHtmlFile({})._tmpl), 'DocIndexHtml should exists.');
    test.ok(existsSync(f.newCiDependenciesConfigJsFile({})._tmpl), 'CiDependenciesConfigJs should exists.');
    test.ok(existsSync(f.newCiIndexConfigJsFile({})._tmpl), 'CiIndexConfigJs should exists.');
    test.ok(existsSync(f.newCiMetaConfigJsFile({})._tmpl), 'CiMetaConfigJs should exists.');
    test.ok(existsSync(f.newCiScaffoldConfigJsFile({})._tmpl), 'CiScaffoldConfigJs should exists.');
    test.ok(existsSync(f.newCiStructureConfigJsFile({})._tmpl), 'CiStructureConfigJs should exists.');
    test.ok(existsSync(f.newCiDebugJsFile({})._tmpl), 'CiDebugJs should exists.');
    test.ok(existsSync(f.newCiDebugTestJsFile({})._tmpl), 'CiDebugTestJs should exists.');
    test.ok(existsSync(f.newCiFileConfigHelperJsFile({})._tmpl), 'CiFileConfigHelperJs should exists.');
    test.ok(existsSync(f.newCiFileConfigHelperTestJsFile({})._tmpl), 'CiFileConfigHelperTestJs should exists.');
    test.ok(existsSync(f.newCiFileReadHelperJsFile({})._tmpl), 'CiFileReadHelperJs should exists.');
    test.ok(existsSync(f.newCiFileReadHelperTestJsFile({})._tmpl), 'CiFileReadHelperTestJs should exists.');
    test.ok(existsSync(f.newCiHelperConfigObjectsJsFile({})._tmpl), 'CiHelperConfigObjectsJs should exists.');
    test.ok(existsSync(f.newCiHelperConfigObjectsTestJsFile({})._tmpl), 'CiHelperConfigObjectsTestJs should exists.');
    test.ok(existsSync(f.newCiTaskDefineHelperJsFile({})._tmpl), 'CiTaskDefineHelperJs should exists.');
    test.ok(existsSync(f.newCiTaskDefineHelperTestJsFile({})._tmpl), 'CiTaskDefineHelperTestJs should exists.');
    test.ok(existsSync(f.newCiTasksJsFile({})._tmpl), 'CiTasksJs should exists.');
    test.ok(existsSync(f.newCiTasksIndexJsFile({})._tmpl), 'CiTasksIndexJs should exists.');
    test.ok(existsSync(f.newCiWorkerJsFile({})._tmpl), 'CiWorkerJs should exists.');
    test.ok(existsSync(f.newIndexJsFile({})._tmpl), 'IndexJs should exists.');
    test.ok(existsSync(f.newIndexTestJsFile({})._tmpl), 'IndexTestJs should exists.');
    test.ok(existsSync(f.newLibIndexTestJsFile({})._tmpl), 'LibIndexTestJs should exists.');
    test.ok(existsSync(f.newMockInjectorJsFile({})._tmpl), 'MockInjectorJs should exists.');
    test.ok(existsSync(f.newTestResourceJsFile({})._tmpl), 'TestResourceJs should exists.');
    test.ok(existsSync(f.newUnitTestJsFile({})._tmpl), 'UnitTestJs should exists.');
    test.ok(existsSync(f.newREADMEMdFile({})._tmpl), 'READMEMd should exists.');
    test.ok(existsSync(f.newMockCoffeeCoffeeFile({})._tmpl), 'MockCoffeeCoffee should exists.');
    test.ok(existsSync(f.newMockCssCssFile({})._tmpl), 'MockCssCss should exists.');
    test.ok(existsSync(f.newMockHtmlHtmlFile({})._tmpl), 'MockHtmlHtml should exists.');
    test.ok(existsSync(f.newMockJadeJadeFile({})._tmpl), 'MockJadeJade should exists.');
    test.ok(existsSync(f.newMockJsJsFile({})._tmpl), 'MockJsJs should exists.');
    test.ok(existsSync(f.newMockLessLessFile({})._tmpl), 'MockLessLess should exists.');
    test.ok(existsSync(f.newMockLogLogFile({})._tmpl), 'MockLogLog should exists.');
    test.ok(existsSync(f.newMockTxtTxtFile({})._tmpl), 'MockTxtTxt should exists.');
    
    test.done();
};
