Move stubs from ./stubs to ./shared/Stubs

Gathers all shared test code in single place.
This commit is contained in:
undergroundwires
2022-01-25 08:37:03 +01:00
parent 43ce834750
commit 803ef2bb3e
94 changed files with 134 additions and 134 deletions

View File

@@ -0,0 +1,28 @@
import { IFunctionCall } from '@/application/Parser/Script/Compiler/Function/Call/IFunctionCall';
import { FunctionCallArgumentCollectionStub } from './FunctionCallArgumentCollectionStub';
export class FunctionCallStub implements IFunctionCall {
public functionName = 'functionCallStub';
public args = new FunctionCallArgumentCollectionStub();
public withFunctionName(functionName: string) {
this.functionName = functionName;
return this;
}
public withArgument(parameterName: string, argumentValue: string) {
this.args.withArgument(parameterName, argumentValue);
return this;
}
public withArguments(args: { readonly [index: string]: string }) {
this.args.withArguments(args);
return this;
}
public withArgumentCollection(args: FunctionCallArgumentCollectionStub) {
this.args = args;
return this;
}
}