@johanblumenberg/ts-mockito
Version:
Mocking library for TypeScript
20 lines (19 loc) • 754 B
TypeScript
import { MethodToStub } from "../MethodToStub";
import { Matcher } from "../matcher/type/Matcher";
import { AbstractMethodStub } from "./AbstractMethodStub";
import { MethodStub } from "./MethodStub";
export interface MockInvocation<T> {
proceed(...args: any[]): T;
}
export declare class CallFunctionMethodStub<T> extends AbstractMethodStub implements MethodStub, MockInvocation<T> {
private matchers;
private methodToStub;
private func;
private validator;
private functionResult;
constructor(groupIndex: number, matchers: Array<Matcher>, methodToStub: MethodToStub, func: any, oneshot?: boolean);
isApplicable(args: any[]): boolean;
execute(args: any[]): void;
getValue(): any;
proceed(...args: any[]): T;
}