// Path: example/src/main/java/net/cattaka/android/adaptertoolbox/example/data/OrdinalLabel.java
// public enum OrdinalLabel implements ICodeLabel {
//     FIRST("first", R.string.ordinal_label_first),
//     SECOND("second", R.string.ordinal_label_second),
//     THIRD("third", R.string.ordinal_label_third),
//     FOURTH("fourth", R.string.ordinal_label_fourth),
//     //
//     ;
// 
//     final String code;
//     @StringRes
//     final int resId;
// 
//     OrdinalLabel(String code, @StringRes int resId) {
//         this.code = code;
//         this.resId = resId;
//     }
// 
//     @Override
//     public String getCode() {
//         return code;
//     }
// 
//     @Override
//     public String getLabel(Resources res) {
//         return res.getString(resId);
//     }
// }
// 
// Path: example/src/androidTest/java/net/cattaka/android/adaptertoolbox/example/test/MockSnackbarLogic.java
// public class MockSnackbarLogic extends SnackbarLogic {
//     @NonNull
//     @Override
//     public ISnackbarWrapper make(@NonNull View view, @NonNull CharSequence text, int duration) {
//         return new MockSnackbarWrapper();
//     }
// 
//     @NonNull
//     @Override
//     public ISnackbarWrapper make(@NonNull View view, int resId, int duration) {
//         return new MockSnackbarWrapper();
//     }
// 
//     public static class MockSnackbarWrapper implements ISnackbarWrapper {
//         @Override
//         public void show() {
//             // no-op
//         }
//     }
// }


import android.content.res.Resources;
import android.support.test.rule.ActivityTestRule;
import android.view.View;
import net.cattaka.android.adaptertoolbox.example.data.OrdinalLabel;
import net.cattaka.android.adaptertoolbox.example.test.MockSnackbarLogic;
import org.junit.Rule;
import org.junit.Test;
import static android.support.test.espresso.Espresso.onData;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static org.hamcrest.Matchers.is;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.contains;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
package net.cattaka.android.adaptertoolbox.example;





/**
 * Created by cattaka on 16/06/05.
 */
public class CodeLabelExampleActivityTest {
    @Rule
    public ActivityTestRule<CodeLabelExampleActivity> mActivityTestRule = new ActivityTestRule<CodeLabelExampleActivity>(CodeLabelExampleActivity.class, false, false);

    @Test
    public void clickSpinner() {
        CodeLabelExampleActivity activity = mActivityTestRule.launchActivity(null);
        activity.mSnackbarLogic = spy(new MockSnackbarLogic());

// Path: example/src/main/java/net/cattaka/android/adaptertoolbox/example/data/OrdinalLabel.java
// public enum OrdinalLabel implements ICodeLabel {
//     FIRST("first", R.string.ordinal_label_first),
//     SECOND("second", R.string.ordinal_label_second),
//     THIRD("third", R.string.ordinal_label_third),
//     FOURTH("fourth", R.string.ordinal_label_fourth),
//     //
//     ;
// 
//     final String code;
//     @StringRes
//     final int resId;
// 
//     OrdinalLabel(String code, @StringRes int resId) {
//         this.code = code;
//         this.resId = resId;
//     }
// 
//     @Override
//     public String getCode() {
//         return code;
//     }
// 
//     @Override
//     public String getLabel(Resources res) {
//         return res.getString(resId);
//     }
// }
// 
// Path: example/src/androidTest/java/net/cattaka/android/adaptertoolbox/example/test/MockSnackbarLogic.java
// public class MockSnackbarLogic extends SnackbarLogic {
//     @NonNull
//     @Override
//     public ISnackbarWrapper make(@NonNull View view, @NonNull CharSequence text, int duration) {
//         return new MockSnackbarWrapper();
//     }
// 
//     @NonNull
//     @Override
//     public ISnackbarWrapper make(@NonNull View view, int resId, int duration) {
//         return new MockSnackbarWrapper();
//     }
// 
//     public static class MockSnackbarWrapper implements ISnackbarWrapper {
//         @Override
//         public void show() {
//             // no-op
//         }
//     }
// }


// Path: example/src/androidTest/java/net/cattaka/android/adaptertoolbox/example/CodeLabelExampleActivityTest.java
import android.content.res.Resources;
import android.support.test.rule.ActivityTestRule;
import android.view.View;
import net.cattaka.android.adaptertoolbox.example.data.OrdinalLabel;
import net.cattaka.android.adaptertoolbox.example.test.MockSnackbarLogic;
import org.junit.Rule;
import org.junit.Test;
import static android.support.test.espresso.Espresso.onData;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static org.hamcrest.Matchers.is;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.contains;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;

package net.cattaka.android.adaptertoolbox.example;





/**
 * Created by cattaka on 16/06/05.
 */
public class CodeLabelExampleActivityTest {
    @Rule
    public ActivityTestRule<CodeLabelExampleActivity> mActivityTestRule = new ActivityTestRule<CodeLabelExampleActivity>(CodeLabelExampleActivity.class, false, false);

    @Test
    public void clickSpinner() {
        CodeLabelExampleActivity activity = mActivityTestRule.launchActivity(null);
        activity.mSnackbarLogic = spy(new MockSnackbarLogic());

        for (OrdinalLabel item : OrdinalLabel.values()) {