Source: test/Scenario.js

/**
 * @version  1.0
 * @author Boris GBAHOUE
 * @file Abstract class for a test scenario
 * @module amiwo/test
*/

// =============================================================
// BASE SETUP
// =============================================================
// call the packages we need

// =============================================================
// CONSTRUCTOR
// =============================================================
/**
 * @class 
 * @abstract
 */
function Scenario(enabled) {
    this.enabled = (enabled === undefined) ? true : enabled;
}

// =============================================================
// PUBLIC METHODS TO BE OVERRIDEN
// =============================================================
/**
 * Run a test an generate a result
 * 
 * @return {Promise} promise wrapping an Object which format must be the same as the input of the validate() method
 */
Scenario.prototype.run = function() {
    return null;
}

/**
 * Tests whether the output of a TestScenario is valid or not
 * 
 * @return {Promise} wrapping an Object {valid: {boolean}, result: {any}}
 */
Scenario.prototype.validate = function(input) {
    return {valid: false};
}

module.exports = Scenario;