// Path: core/src/main/java/io/github/theangrydev/fluentbdd/core/FluentBdd.java
// @SuppressWarnings("FunctionalInterfaceClash") // This is unfortunate, but seems like the lesser evil than having many method names
// public class FluentBdd<TestResult> extends TestWatcher implements FluentBddCommands<TestResult> {
// 
//     public final Verification<TestResult> verification = new Verification<>();
// 
//     private TestResult testResult;
// 
//     /**
//      * Constructs a {@link FluentBdd} without an initial {@link TestResult}.
//      */
//     public FluentBdd() {
//         this(null);
//     }
// 
//     /**
//      * Constructs a {@link FluentBdd} with an initial {@link TestResult}.
//      * This is useful when used in conjunction with {@link #whenCalling(WhenWithoutResult)}, for example when the
//      * {@link TestResult} type is the test class and the {@link WhenWithoutResult} sets a field in the test.
//      *
//      * @param testResult The initial {@link TestResult}.
//      */
//     public FluentBdd(TestResult testResult) {
//         this.testResult = testResult;
//     }
// 
//     @Override
//     protected void succeeded(Description description) {
//         verification.checkThenHasBeenUsed();
//     }
// 
//     /**
//      * Prime the given immediately.
//      *
//      * @param given The first given in the acceptance test, which should be built up inside the brackets
//      */
//     @Override
//     public void given(Given given) {
//         verification.recordGiven(given);
//         given.prime();
//     }
// 
//     @Override
//     public <T extends When<TestResult>> void when(T when) {
//         testResult = verification.recordWhen(when);
//     }
// 
//     @Override
//     public TestResult theResult() {
//         if (testResult == null) {
//             throw new IllegalStateException("The 'when' has not been executed yet so there is no test result yet!");
//         }
//         return testResult;
//     }
// 
//     @Override
//     public <Then> Then then(ThenAssertion<Then, TestResult> thenAssertion) {
//         verification.recordThen(thenAssertion);
//         return thenAssertion.then(testResult);
//     }
// 
//     @Override
//     public void then(ThenVerification<TestResult> thenVerification) {
//         verification.recordThen(thenVerification);
//         thenVerification.verify(testResult);
//     }
// }
// 
// Path: core/src/main/java/io/github/theangrydev/fluentbdd/core/ThenVerification.java
// @FunctionalInterface
// public interface ThenVerification<TestResult> {
// 
//     /**
//      * Verify that the {@link TestResult} matches the criteria that were built up to make this {@link ThenVerification}.
//      *
//      * @param testResult The result from the system under test
//      */
//     void verify(TestResult testResult);
// }
// 
// Path: core/src/main/java/io/github/theangrydev/fluentbdd/core/WhenWithoutResult.java
// @FunctionalInterface
// public interface WhenWithoutResult {
// 
//     /**
//      * Execute the request on the system under test. Any result is assumed to have been set by e.g. setting a field on
//      * the test class, which is possible when the {@link FluentBdd#FluentBdd(Object) FluentBdd(TestResult)} constructor is used.
//      */
//     void execute();
// }


import io.github.theangrydev.fluentbdd.core.FluentBdd;
import io.github.theangrydev.fluentbdd.core.ThenVerification;
import io.github.theangrydev.fluentbdd.core.WhenWithoutResult;
import org.assertj.core.api.WithAssertions;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.exceptions.verification.VerificationInOrderFailure;
import static org.mockito.Mockito.mock;
/*
 * Copyright 2016 Liam Williams <liam.williams@zoho.com>.
 *
 * 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;



public class FluentMockitoTest implements WithFluentMockito<FluentMockitoTest>, WithAssertions {

    @Rule
// Path: core/src/main/java/io/github/theangrydev/fluentbdd/core/FluentBdd.java
// @SuppressWarnings("FunctionalInterfaceClash") // This is unfortunate, but seems like the lesser evil than having many method names
// public class FluentBdd<TestResult> extends TestWatcher implements FluentBddCommands<TestResult> {
// 
//     public final Verification<TestResult> verification = new Verification<>();
// 
//     private TestResult testResult;
// 
//     /**
//      * Constructs a {@link FluentBdd} without an initial {@link TestResult}.
//      */
//     public FluentBdd() {
//         this(null);
//     }
// 
//     /**
//      * Constructs a {@link FluentBdd} with an initial {@link TestResult}.
//      * This is useful when used in conjunction with {@link #whenCalling(WhenWithoutResult)}, for example when the
//      * {@link TestResult} type is the test class and the {@link WhenWithoutResult} sets a field in the test.
//      *
//      * @param testResult The initial {@link TestResult}.
//      */
//     public FluentBdd(TestResult testResult) {
//         this.testResult = testResult;
//     }
// 
//     @Override
//     protected void succeeded(Description description) {
//         verification.checkThenHasBeenUsed();
//     }
// 
//     /**
//      * Prime the given immediately.
//      *
//      * @param given The first given in the acceptance test, which should be built up inside the brackets
//      */
//     @Override
//     public void given(Given given) {
//         verification.recordGiven(given);
//         given.prime();
//     }
// 
//     @Override
//     public <T extends When<TestResult>> void when(T when) {
//         testResult = verification.recordWhen(when);
//     }
// 
//     @Override
//     public TestResult theResult() {
//         if (testResult == null) {
//             throw new IllegalStateException("The 'when' has not been executed yet so there is no test result yet!");
//         }
//         return testResult;
//     }
// 
//     @Override
//     public <Then> Then then(ThenAssertion<Then, TestResult> thenAssertion) {
//         verification.recordThen(thenAssertion);
//         return thenAssertion.then(testResult);
//     }
// 
//     @Override
//     public void then(ThenVerification<TestResult> thenVerification) {
//         verification.recordThen(thenVerification);
//         thenVerification.verify(testResult);
//     }
// }
// 
// Path: core/src/main/java/io/github/theangrydev/fluentbdd/core/ThenVerification.java
// @FunctionalInterface
// public interface ThenVerification<TestResult> {
// 
//     /**
//      * Verify that the {@link TestResult} matches the criteria that were built up to make this {@link ThenVerification}.
//      *
//      * @param testResult The result from the system under test
//      */
//     void verify(TestResult testResult);
// }
// 
// Path: core/src/main/java/io/github/theangrydev/fluentbdd/core/WhenWithoutResult.java
// @FunctionalInterface
// public interface WhenWithoutResult {
// 
//     /**
//      * Execute the request on the system under test. Any result is assumed to have been set by e.g. setting a field on
//      * the test class, which is possible when the {@link FluentBdd#FluentBdd(Object) FluentBdd(TestResult)} constructor is used.
//      */
//     void execute();
// }


// Path: mockito-extensions/src/test/java/io/github/theangrydev/fluentbdd/mockito/FluentMockitoTest.java
import io.github.theangrydev.fluentbdd.core.FluentBdd;
import io.github.theangrydev.fluentbdd.core.ThenVerification;
import io.github.theangrydev.fluentbdd.core.WhenWithoutResult;
import org.assertj.core.api.WithAssertions;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.exceptions.verification.VerificationInOrderFailure;
import static org.mockito.Mockito.mock;

/*
 * Copyright 2016 Liam Williams <liam.williams@zoho.com>.
 *
 * 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;



public class FluentMockitoTest implements WithFluentMockito<FluentMockitoTest>, WithAssertions {

    @Rule
    public final FluentBdd<FluentMockitoTest> fluentBdd = new FluentBdd<>(this);