/**
 * Define reflect tasks.
 * @module ci.tasks.reflectTasks
 * @author "ci.worker.generateStructure"
 *
 */
var helpers = require('../helpers'),
    t = helpers.taskDefineHelper,
    apeman = require('apeman'),
    currentProject = apeman.currentProject,
    indexConfig = currentProject.lookupRequire('ci/config/index-config');


exports.reflectIndexTests = t.generateIndexTest({
    srcDir: indexConfig.dirs,
    destDir: 'test/unit_tests'
});

/**
 * Reflect lib source files to unit test.
 * @name ci.tasks.reflectLibUnitTests
 * @type {object}
 */
exports.reflectLibUnitTests = t.generateUnitTestFiles({
    srcDir: 'lib',
    pattern: '*/*.js',
    destDir: 'test/unit_tests/lib'
});

/**
 * Reflect ci source files to unit test.
 * @name ci.tasks.reflectCiUnitTests
 * @type {object}
 */
exports.reflectCiUnitTests = t.generateUnitTestFiles({
    srcDir: 'ci',
    pattern: '+(worker|helpers)/*.js',
    destDir: 'test/unit_tests/ci'
});

exports.reflectIndices = [
    'index'
];
exports.reflectVisuals = [
    'visualize'
];

/**
 * Reflect source files to unit test.
 * @name ci.tasks.reflectUnitTests
 * @type {string[]}
 */
exports.reflectUnitTests = [
    'reflectIndexTests',
    'reflectIndices',
    'reflectVisuals',
    'reflectCiUnitTests',
    'reflectLibUnitTests'
];

/**
 * Reflect files task.
 * @name ci.tasks.reflect
 * @type {object}
 */
exports.reflect = [
    'reflectUnitTests'
];