package net.poksion.chorong.android.samples;

public class MainActivityTest {
}

@@ -45,39 +45,1661 @@
 %0D%0A%0D%0A
-public class MainActivityTest %7B
+import static android.support.test.InstrumentationRegistry.getInstrumentation;%0D%0Aimport static android.support.test.espresso.Espresso.onView;%0D%0Aimport static android.support.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu;%0D%0Aimport static android.support.test.espresso.assertion.ViewAssertions.matches;%0D%0Aimport static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;%0D%0Aimport static android.support.test.espresso.matcher.ViewMatchers.withText;%0D%0Aimport static junit.framework.Assert.assertEquals;%0D%0Aimport static junit.framework.Assert.assertNotNull;%0D%0A%0D%0Aimport android.support.test.rule.ActivityTestRule;%0D%0Aimport android.support.test.runner.AndroidJUnit4;%0D%0Aimport org.junit.Rule;%0D%0Aimport org.junit.Test;%0D%0Aimport org.junit.runner.RunWith;%0D%0A%0D%0A@RunWith(AndroidJUnit4.class)%0D%0Apublic class MainActivityTest %7B%0D%0A%0D%0A    @Rule public final ActivityTestRule%3CMainActivity%3E mainActivityTestRule = new ActivityTestRule%3C%3E(MainActivity.class);%0D%0A%0D%0A    @Test%0D%0A    public void assemble_annotation_should_be_worked_so_not_null() %7B%0D%0A        MainActivity mainActivity = mainActivityTestRule.getActivity();%0D%0A%0D%0A        assertNotNull(mainActivity.objectStore);%0D%0A        assertNotNull(mainActivity.parentContentView);%0D%0A        assertNotNull(mainActivity.buttonContainer);%0D%0A    %7D%0D%0A%0D%0A    @Test%0D%0A    public void given_menu_info_should_be_displayed() %7B%0D%0A        MainActivity mainActivity = mainActivityTestRule.getActivity();%0D%0A        assertEquals(1, mainActivity.getMenuInfoList().size());%0D%0A%0D%0A        openActionBarOverflowOrOptionsMenu(getInstrumentation().getTargetContext());%0D%0A%0D%0A        onView(withText(R.string.menu_info)).check(matches(isDisplayed()));%0D%0A    %7D
 %0D%0A%7D%0D

add menu view test