Files
privacy.sexy/tests/unit/shared/Stubs/FunctionCallStub.ts
undergroundwires 803ef2bb3e Move stubs from ./stubs to ./shared/Stubs
Gathers all shared test code in single place.
2022-01-25 08:37:03 +01:00

29 lines
858 B
TypeScript

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;
}
}