import { IProjectInformation } from '@/domain/IProjectInformation' ; import { ICodeSubstituter } from '@/application/Parser/ScriptingDefinition/ICodeSubstituter' ; export class CodeSubstituterStub implements ICodeSubstituter { private readonly scenarios = new Array < { code : string ; info : IProjectInformation ; result : string ; } > ( ) ; public substitute ( code , info ) { const scenario = this . scenarios . find ( ( s ) => s . code === code && s . info === info ) ; if ( scenario ) { return scenario . result ; } return `[CodeSubstituterStub] - code: ${ code }` ; } public setup ( code , info , result ) { this . scenarios . push ( { code , info , result } ) ; return this ; } }