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

org.mockito.stubbing.LenientStubber Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2007 Mockito contributors
 * This program is made available under the terms of the MIT License.
 */
package org.mockito.stubbing;

import org.mockito.CheckReturnValue;
import org.mockito.Mockito;
import org.mockito.NotExtensible;

/**
 * Used for declaring optional stubbings with {@link Mockito#lenient()}
 *
 * @since 2.20.0
 */
@NotExtensible
public interface LenientStubber extends BaseStubber {

    /**
     * Allows declaring the method to stub. See {@link Mockito#when(Object)}.
     * Needed for classic stubbing with when().then()
     *
     * @since 2.20.0
     */
    @CheckReturnValue
     OngoingStubbing when(T methodCall);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy