export class StubDiffStatsFetchGateway {
    responses = new Map();
    failingMergeRequests = new Set();
    fetchCallCount = 0;
    fetchDiffStats(_projectPath, mergeRequestNumber) {
        this.fetchCallCount++;
        if (this.failingMergeRequests.has(mergeRequestNumber)) {
            throw new Error(`API error for MR ${mergeRequestNumber}`);
        }
        return this.responses.get(mergeRequestNumber) ?? null;
    }
    setResponse(mergeRequestNumber, diffStats) {
        this.responses.set(mergeRequestNumber, diffStats);
    }
    setFailure(mergeRequestNumber) {
        this.failingMergeRequests.add(mergeRequestNumber);
    }
}
//# sourceMappingURL=diffStatsFetch.stub.js.map