All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.test4j.mock.stub.StubFakeInvocation Maven / Gradle / Ivy

package org.test4j.mock.stub;

import org.test4j.mock.Invocation;

public class StubFakeInvocation extends Invocation {
    private Object target;
    private Object[] args;
    private int times;

    StubFakeInvocation(Object target, Object[] args, int times) {
        this.target = target;
        this.args = args;
        this.times = times;
    }

    @Override
    public  T proceed(Object... args) {
        throw new RuntimeException("the abstract method can't be reentry again.");
    }

    @Override
    public  T getTarget() {
        return (T) target;
    }

    @Override
    public Object[] getArgs() {
        return this.args;
    }

    @Override
    public int getInvokedTimes() {
        return this.times;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy