// Path: app/src/main/java/com/mindbodyonline/ironhidetestapp/SimpleActivity.java
// public class SimpleActivity extends Activity implements OnItemSelectedListener{
// 
//     static final String EXTRA_DATA = "com.mindbodyonline.ironhidetestapp.DATA";
// 
//     @Override
//     public void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.simple_activity);
// 
//         Spinner spinner = (Spinner) findViewById(R.id.spinner_simple);
//         ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,
//                 R.array.spinner_array, android.R.layout.simple_spinner_item);
//         adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
//         spinner.setAdapter(adapter);
//         spinner.setOnItemSelectedListener(this);
//     }
// 
//     public void simpleButtonClicked(View view) {
//         TextView textView = (TextView) findViewById(R.id.text_simple);
//         String message = "Hello Espresso!";
//         textView.setText(message);
//     }
// 
//     /** Called when user clicks the Send button */
//     public void sendButtonClicked(@SuppressWarnings("unused") View view) {
//         Intent intent = new Intent(this, DisplayActivity.class);
//         EditText editText = (EditText) findViewById(R.id.sendtext_simple);
//         intent.putExtra(EXTRA_DATA, editText.getText().toString());
//         startActivity(intent);
//     }
// 
//     public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
//         TextView textView = (TextView) findViewById(R.id.spinnertext_simple);
//         textView.setText(String.format("One %s a day!", parent.getItemAtPosition(pos)));
//     }
// 
//     public void onNothingSelected(AdapterView<?> parent) {
//     }
// }
// 
// Path: app/src/androidTest/java/com/mindbodyonline/ironhidetestapp/TestFixture.java
// public class TestFixture <T extends Activity> extends BaseInstrumentTestCase<T>{
// 
//     protected ActionBarModel ActionBarPage = new ActionBarModel();
//     protected LongListModel LongListPage = new LongListModel();
//     protected SimpleModel SimplePage = new SimpleModel();
//     protected DrawerModel DrawerPage = new DrawerModel();
//     protected DisplayModel DisplayPage = new DisplayModel();
//     protected MenuModel MenuPage = new MenuModel();
//     protected SendModel SendPage = new SendModel();
//     protected ScrollModel ScrollPage = new ScrollModel();
//     protected ViewPagerModel PagerPage = new ViewPagerModel();
//     protected SyncModel SyncPage = new SyncModel();
//     protected ZoomModel ZoomPage = new ZoomModel();
// 
//     public TestFixture(Class<T> activityClass) {
//         super(activityClass);
//     }
// }
// 
// Path: app/src/androidTest/java/com/mindbodyonline/ironhidetestapp/models/SimpleModel.java
// public class SimpleModel extends PageObject {
// 
//     public Clickable<SimpleModel> SimpleButton = new Clickable<>(SimpleModel.class, R.id.button_simple);
//     
//     public Clickable<SimpleModel> SimpleText = new Clickable<>(SimpleModel.class, R.id.text_simple);
//     
//     public TextField<SimpleModel> SimpleSendText = new TextField<>(SimpleModel.class, R.id.sendtext_simple);
//     
//     public Clickable<DisplayModel> SimpleSend = new Clickable<>(DisplayModel.class, R.id.send_simple);
//     
//     public SpinnerView<SimpleModel> SimpleSpinner = new SpinnerView<>(SimpleModel.class, R.id.spinner_simple);
//     
//     public ListAdapter<SimpleModel> SpinnerList = new ListAdapter<>(SimpleModel.class, String.class);
// }


import android.test.suitebuilder.annotation.LargeTest;
import com.mindbodyonline.ironhidetestapp.R;
import com.mindbodyonline.ironhidetestapp.SimpleActivity;
import com.mindbodyonline.ironhidetestapp.TestFixture;
import com.mindbodyonline.ironhidetestapp.models.SimpleModel;
import org.junit.Test;
package com.mindbodyonline.ironhidetestapp.tests;




/**
 * Highlights basic
 * {@link android.support.test.espresso.Espresso#onView(org.hamcrest.Matcher)}
 * functionality.
 */
@LargeTest
public class BasicTest extends TestFixture<SimpleActivity> {
    
    public BasicTest() {
        super(SimpleActivity.class);
    }

    @Test
    public void testSimpleClickAndCheckText() {
        SimplePage
                .SimpleButton.click()
                .SimpleText.withText("Hello Espresso!")
                ;
    }

    @Test
    public void testTypingAndPressBack() {
        SimplePage
                .SimpleSendText.typeText(R.string.hello_world)
                .SimpleSendText.closeKeyboard()
                .SimpleSend.click()
                .displayText.withText(R.string.hello_world)
// Path: app/src/main/java/com/mindbodyonline/ironhidetestapp/SimpleActivity.java
// public class SimpleActivity extends Activity implements OnItemSelectedListener{
// 
//     static final String EXTRA_DATA = "com.mindbodyonline.ironhidetestapp.DATA";
// 
//     @Override
//     public void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.simple_activity);
// 
//         Spinner spinner = (Spinner) findViewById(R.id.spinner_simple);
//         ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,
//                 R.array.spinner_array, android.R.layout.simple_spinner_item);
//         adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
//         spinner.setAdapter(adapter);
//         spinner.setOnItemSelectedListener(this);
//     }
// 
//     public void simpleButtonClicked(View view) {
//         TextView textView = (TextView) findViewById(R.id.text_simple);
//         String message = "Hello Espresso!";
//         textView.setText(message);
//     }
// 
//     /** Called when user clicks the Send button */
//     public void sendButtonClicked(@SuppressWarnings("unused") View view) {
//         Intent intent = new Intent(this, DisplayActivity.class);
//         EditText editText = (EditText) findViewById(R.id.sendtext_simple);
//         intent.putExtra(EXTRA_DATA, editText.getText().toString());
//         startActivity(intent);
//     }
// 
//     public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
//         TextView textView = (TextView) findViewById(R.id.spinnertext_simple);
//         textView.setText(String.format("One %s a day!", parent.getItemAtPosition(pos)));
//     }
// 
//     public void onNothingSelected(AdapterView<?> parent) {
//     }
// }
// 
// Path: app/src/androidTest/java/com/mindbodyonline/ironhidetestapp/TestFixture.java
// public class TestFixture <T extends Activity> extends BaseInstrumentTestCase<T>{
// 
//     protected ActionBarModel ActionBarPage = new ActionBarModel();
//     protected LongListModel LongListPage = new LongListModel();
//     protected SimpleModel SimplePage = new SimpleModel();
//     protected DrawerModel DrawerPage = new DrawerModel();
//     protected DisplayModel DisplayPage = new DisplayModel();
//     protected MenuModel MenuPage = new MenuModel();
//     protected SendModel SendPage = new SendModel();
//     protected ScrollModel ScrollPage = new ScrollModel();
//     protected ViewPagerModel PagerPage = new ViewPagerModel();
//     protected SyncModel SyncPage = new SyncModel();
//     protected ZoomModel ZoomPage = new ZoomModel();
// 
//     public TestFixture(Class<T> activityClass) {
//         super(activityClass);
//     }
// }
// 
// Path: app/src/androidTest/java/com/mindbodyonline/ironhidetestapp/models/SimpleModel.java
// public class SimpleModel extends PageObject {
// 
//     public Clickable<SimpleModel> SimpleButton = new Clickable<>(SimpleModel.class, R.id.button_simple);
//     
//     public Clickable<SimpleModel> SimpleText = new Clickable<>(SimpleModel.class, R.id.text_simple);
//     
//     public TextField<SimpleModel> SimpleSendText = new TextField<>(SimpleModel.class, R.id.sendtext_simple);
//     
//     public Clickable<DisplayModel> SimpleSend = new Clickable<>(DisplayModel.class, R.id.send_simple);
//     
//     public SpinnerView<SimpleModel> SimpleSpinner = new SpinnerView<>(SimpleModel.class, R.id.spinner_simple);
//     
//     public ListAdapter<SimpleModel> SpinnerList = new ListAdapter<>(SimpleModel.class, String.class);
// }


// Path: app/src/androidTest/java/com/mindbodyonline/ironhidetestapp/tests/BasicTest.java
import android.test.suitebuilder.annotation.LargeTest;
import com.mindbodyonline.ironhidetestapp.R;
import com.mindbodyonline.ironhidetestapp.SimpleActivity;
import com.mindbodyonline.ironhidetestapp.TestFixture;
import com.mindbodyonline.ironhidetestapp.models.SimpleModel;
import org.junit.Test;

package com.mindbodyonline.ironhidetestapp.tests;




/**
 * Highlights basic
 * {@link android.support.test.espresso.Espresso#onView(org.hamcrest.Matcher)}
 * functionality.
 */
@LargeTest
public class BasicTest extends TestFixture<SimpleActivity> {
    
    public BasicTest() {
        super(SimpleActivity.class);
    }

    @Test
    public void testSimpleClickAndCheckText() {
        SimplePage
                .SimpleButton.click()
                .SimpleText.withText("Hello Espresso!")
                ;
    }

    @Test
    public void testTypingAndPressBack() {
        SimplePage
                .SimpleSendText.typeText(R.string.hello_world)
                .SimpleSendText.closeKeyboard()
                .SimpleSend.click()
                .displayText.withText(R.string.hello_world)
                .displayText.goesTo(SimpleModel.class).pressBack()