Move stubs from ./stubs to ./shared/Stubs
Gathers all shared test code in single place.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { ICategoryCollectionParseContext } from '@/application/Parser/Script/ICategoryCollectionParseContext';
|
||||
import { IScriptCompiler } from '@/application/Parser/Script/Compiler/IScriptCompiler';
|
||||
import { ILanguageSyntax } from '@/domain/ScriptCode';
|
||||
import { ScriptCompilerStub } from './ScriptCompilerStub';
|
||||
import { LanguageSyntaxStub } from './LanguageSyntaxStub';
|
||||
|
||||
export class CategoryCollectionParseContextStub implements ICategoryCollectionParseContext {
|
||||
public compiler: IScriptCompiler = new ScriptCompilerStub();
|
||||
|
||||
public syntax: ILanguageSyntax = new LanguageSyntaxStub();
|
||||
|
||||
public withCompiler(compiler: IScriptCompiler) {
|
||||
this.compiler = compiler;
|
||||
return this;
|
||||
}
|
||||
|
||||
public withSyntax(syntax: ILanguageSyntax) {
|
||||
this.syntax = syntax;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user