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

io.github.theangrydev.fluentbdd.mockito.FluentMockitoGiven Maven / Gradle / Ivy

There is a newer version: 8.2.2
Show newest version
/*
 * Copyright 2016 Liam Williams .
 *
 * This file is part of fluent-bdd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.github.theangrydev.fluentbdd.mockito;

import org.mockito.BDDMockito;

//TODO: document
public class FluentMockitoGiven {
    private final Mock mock;

    FluentMockitoGiven(Mock mock) {
        this.mock = mock;
    }

    //TODO: will do nothing will throw etc use BDDStubber at this point
    public FluentMockitoGivenCommand willReturn(Object result) {
        return new FluentMockitoGivenCommand<>(mock, BDDMockito.willReturn(result));
    }

    public FluentMockitoGivenCommand willDoNothing() {
        return new FluentMockitoGivenCommand<>(mock, BDDMockito.willDoNothing());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy