// Path: src/main/java/org/ligi/axt/listeners/RepeatedOnClicksListener.java
// public class RepeatedOnClicksListener implements View.OnClickListener {
// 
//     private final View.OnClickListener listener;
//     private final int configuredClicksBeforeFiring;
//     private int actClicksBeforeFiring;
//     private boolean repeatsAreAllowed = true;
//     private int callCount;
// 
//     public RepeatedOnClicksListener(int clickCountBeforeFire, View.OnClickListener listener) {
//         this.listener = listener;
//         this.configuredClicksBeforeFiring = clickCountBeforeFire;
//         this.actClicksBeforeFiring = configuredClicksBeforeFiring;
//         callCount = 0;
//     }
// 
//     @Override
//     public void onClick(View view) {
//         if (callCount == 0 || repeatsAreAllowed) {
//             if (actClicksBeforeFiring-- <= 0) {
//                 listener.onClick(view);
//                 actClicksBeforeFiring = configuredClicksBeforeFiring;
//                 callCount++;
//             }
//         }
//     }
// 
//     public RepeatedOnClicksListener doNotRepeatCalls() {
//         repeatsAreAllowed = false;
//         return this;
//     }
// 
//     public int getCallCount() {
//         return callCount;
//     }
// 
// }


import android.view.View;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ligi.axt.listeners.RepeatedOnClicksListener;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
import static android.view.View.OnClickListener;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
package org.ligi.axt.test;


@RunWith(RobolectricTestRunner.class)
public class TheRepeatedOnClicksListener {

    @Mock
    private OnClickListener listener;

    @Mock
    private View view;

    @Before
    public void before() {
        MockitoAnnotations.initMocks(this);
    }

    @Test
    public void should_not_fire_when_not_clicked() {
// Path: src/main/java/org/ligi/axt/listeners/RepeatedOnClicksListener.java
// public class RepeatedOnClicksListener implements View.OnClickListener {
// 
//     private final View.OnClickListener listener;
//     private final int configuredClicksBeforeFiring;
//     private int actClicksBeforeFiring;
//     private boolean repeatsAreAllowed = true;
//     private int callCount;
// 
//     public RepeatedOnClicksListener(int clickCountBeforeFire, View.OnClickListener listener) {
//         this.listener = listener;
//         this.configuredClicksBeforeFiring = clickCountBeforeFire;
//         this.actClicksBeforeFiring = configuredClicksBeforeFiring;
//         callCount = 0;
//     }
// 
//     @Override
//     public void onClick(View view) {
//         if (callCount == 0 || repeatsAreAllowed) {
//             if (actClicksBeforeFiring-- <= 0) {
//                 listener.onClick(view);
//                 actClicksBeforeFiring = configuredClicksBeforeFiring;
//                 callCount++;
//             }
//         }
//     }
// 
//     public RepeatedOnClicksListener doNotRepeatCalls() {
//         repeatsAreAllowed = false;
//         return this;
//     }
// 
//     public int getCallCount() {
//         return callCount;
//     }
// 
// }


// Path: src/test/java/org/ligi/axt/test/TheRepeatedOnClicksListener.java
import android.view.View;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ligi.axt.listeners.RepeatedOnClicksListener;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
import static android.view.View.OnClickListener;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

package org.ligi.axt.test;


@RunWith(RobolectricTestRunner.class)
public class TheRepeatedOnClicksListener {

    @Mock
    private OnClickListener listener;

    @Mock
    private View view;

    @Before
    public void before() {
        MockitoAnnotations.initMocks(this);
    }

    @Test
    public void should_not_fire_when_not_clicked() {
        new RepeatedOnClicksListener(1, listener);