Move stubs from ./stubs to ./shared/Stubs
Gathers all shared test code in single place.
This commit is contained in:
27
tests/unit/shared/Stubs/ScriptingDefinitionStub.ts
Normal file
27
tests/unit/shared/Stubs/ScriptingDefinitionStub.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { IScriptingDefinition } from '@/domain/IScriptingDefinition';
|
||||
import { ScriptingLanguage } from '@/domain/ScriptingLanguage';
|
||||
|
||||
export class ScriptingDefinitionStub implements IScriptingDefinition {
|
||||
public fileExtension = '.bat';
|
||||
|
||||
public language = ScriptingLanguage.batchfile;
|
||||
|
||||
public startCode = 'REM start code';
|
||||
|
||||
public endCode = 'REM end code';
|
||||
|
||||
public withStartCode(startCode: string): ScriptingDefinitionStub {
|
||||
this.startCode = startCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public withEndCode(endCode: string): ScriptingDefinitionStub {
|
||||
this.endCode = endCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public withLanguage(language: ScriptingLanguage): ScriptingDefinitionStub {
|
||||
this.language = language;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user