// Path: app/src/main/java/com/mindbodyonline/ironhidetestapp/MenuActivity.java
// public class MenuActivity extends Activity {
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.menu_activity);
//         registerForContextMenu(findViewById(R.id.text_context_menu));
//     }
// 
//     @Override
//     public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
//         super.onCreateContextMenu(menu, v, menuInfo);
//         MenuInflater inflater = getMenuInflater();
//         inflater.inflate(R.menu.contextmenu, menu);
//     }
// 
//     @Override
//     public boolean onOptionsItemSelected(MenuItem item) {
//         TextView text = (TextView) findViewById(R.id.text_menu_result);
//         text.setText(item.getTitle());
//         return true;
//     }
// 
//     @Override
//     public boolean onCreateOptionsMenu(Menu menu) {
//         MenuInflater inflater = getMenuInflater();
//         inflater.inflate(R.menu.optionsmenu, menu);
//         return true;
//     }
// 
//     @Override
//     public boolean onContextItemSelected(MenuItem item) {
//         TextView text = (TextView) findViewById(R.id.text_menu_result);
//         text.setText(item.getTitle());
//         return true;
//     }
// 
//     public void showPopup(View view) {
//         if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
//             TextView text = (TextView) findViewById(R.id.text_menu_result);
//             text.setText("Not supported in API " + Build.VERSION.SDK_INT);
//         } else {
//             PopupMenu popup = new PopupMenu(this, view);
//             popup.setOnMenuItemClickListener(new PopupMenuListener());
//             popup.getMenuInflater().inflate(R.menu.popupmenu, popup.getMenu());
//             popup.show();
//         }
//     }
// 
//     @Override
//     public boolean onMenuItemSelected(int featureId, MenuItem item) {
//         return super.onMenuItemSelected(featureId, item);
//     }
// 
//     private class PopupMenuListener implements OnMenuItemClickListener {
//         @Override
//         public boolean onMenuItemClick(MenuItem item) {
//             TextView text = (TextView) findViewById(R.id.text_menu_result);
//             text.setText(item.getTitle());
//             return true;
//         }
//     }
// }
// 
// 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);
//     }
// }


import android.os.Build;
import android.test.suitebuilder.annotation.LargeTest;
import com.mindbodyonline.ironhidetestapp.MenuActivity;
import com.mindbodyonline.ironhidetestapp.R;
import com.mindbodyonline.ironhidetestapp.TestFixture;
import org.junit.Test;
package com.mindbodyonline.ironhidetestapp.tests;




/**
 * Ensures view root ordering works properly.
 */
@LargeTest
public class MenuTest extends TestFixture<MenuActivity> {
    
    public MenuTest() {
        super(MenuActivity.class);
    }

    @Test
    public void testPopupMenu() {
        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB)
            return;
        
        MenuPage
                .Popup1.doesNotExist()
                .PopupButton.click()
                .Popup1.click()
                .ResultText.withText(R.string.popup_item_1_text)
                ;
    }

    @Test
    public void testContextMenu() {
        MenuPage
                .Context2.doesNotExist()
                .ContextButton.longClick()
                .Context2.isDisplayed()
                .Context2.click()
                .ResultText.withText(R.string.context_item_2_text)
                ;
    }

    @Test
    public void testOptionMenu() {
        MenuPage
// Path: app/src/main/java/com/mindbodyonline/ironhidetestapp/MenuActivity.java
// public class MenuActivity extends Activity {
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.menu_activity);
//         registerForContextMenu(findViewById(R.id.text_context_menu));
//     }
// 
//     @Override
//     public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
//         super.onCreateContextMenu(menu, v, menuInfo);
//         MenuInflater inflater = getMenuInflater();
//         inflater.inflate(R.menu.contextmenu, menu);
//     }
// 
//     @Override
//     public boolean onOptionsItemSelected(MenuItem item) {
//         TextView text = (TextView) findViewById(R.id.text_menu_result);
//         text.setText(item.getTitle());
//         return true;
//     }
// 
//     @Override
//     public boolean onCreateOptionsMenu(Menu menu) {
//         MenuInflater inflater = getMenuInflater();
//         inflater.inflate(R.menu.optionsmenu, menu);
//         return true;
//     }
// 
//     @Override
//     public boolean onContextItemSelected(MenuItem item) {
//         TextView text = (TextView) findViewById(R.id.text_menu_result);
//         text.setText(item.getTitle());
//         return true;
//     }
// 
//     public void showPopup(View view) {
//         if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
//             TextView text = (TextView) findViewById(R.id.text_menu_result);
//             text.setText("Not supported in API " + Build.VERSION.SDK_INT);
//         } else {
//             PopupMenu popup = new PopupMenu(this, view);
//             popup.setOnMenuItemClickListener(new PopupMenuListener());
//             popup.getMenuInflater().inflate(R.menu.popupmenu, popup.getMenu());
//             popup.show();
//         }
//     }
// 
//     @Override
//     public boolean onMenuItemSelected(int featureId, MenuItem item) {
//         return super.onMenuItemSelected(featureId, item);
//     }
// 
//     private class PopupMenuListener implements OnMenuItemClickListener {
//         @Override
//         public boolean onMenuItemClick(MenuItem item) {
//             TextView text = (TextView) findViewById(R.id.text_menu_result);
//             text.setText(item.getTitle());
//             return true;
//         }
//     }
// }
// 
// 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/tests/MenuTest.java
import android.os.Build;
import android.test.suitebuilder.annotation.LargeTest;
import com.mindbodyonline.ironhidetestapp.MenuActivity;
import com.mindbodyonline.ironhidetestapp.R;
import com.mindbodyonline.ironhidetestapp.TestFixture;
import org.junit.Test;

package com.mindbodyonline.ironhidetestapp.tests;




/**
 * Ensures view root ordering works properly.
 */
@LargeTest
public class MenuTest extends TestFixture<MenuActivity> {
    
    public MenuTest() {
        super(MenuActivity.class);
    }

    @Test
    public void testPopupMenu() {
        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB)
            return;
        
        MenuPage
                .Popup1.doesNotExist()
                .PopupButton.click()
                .Popup1.click()
                .ResultText.withText(R.string.popup_item_1_text)
                ;
    }

    @Test
    public void testContextMenu() {
        MenuPage
                .Context2.doesNotExist()
                .ContextButton.longClick()
                .Context2.isDisplayed()
                .Context2.click()
                .ResultText.withText(R.string.context_item_2_text)
                ;
    }

    @Test
    public void testOptionMenu() {
        MenuPage
                .Options3.doesNotExist()