@@ -0,0 +1,2877 @@
+package com.philliphsu.bottomsheetpickers;%0A%0Aimport android.support.test.espresso.Espresso;%0Aimport android.support.test.espresso.ViewAssertion;%0Aimport android.support.test.espresso.ViewInteraction;%0Aimport android.support.test.espresso.action.ViewActions;%0Aimport android.support.test.espresso.assertion.ViewAssertions;%0Aimport android.support.test.espresso.matcher.ViewMatchers;%0Aimport android.support.test.rule.ActivityTestRule;%0Aimport android.support.test.runner.AndroidJUnit4;%0A%0Aimport com.example.bottomsheetpickers.R;%0Aimport com.example.bottomsheetpickers.TextSwitcherActivity;%0A%0Aimport org.hamcrest.Matcher;%0Aimport org.hamcrest.core.StringContains;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0A@RunWith(AndroidJUnit4.class)%0Apublic class NumberPadTimePickerDialogTest %7B%0A    private static final String TIME_PICKER_VIEW_CLASS_NAME = %22NumberPadTimePicker%22;%0A%0A    /**%0A     * %7B@link ActivityTestRule%7D is a JUnit %7B@link Rule @Rule%7D to launch your activity under test.%0A     *%0A     * %3Cp%3E%0A     * Rules are interceptors which are executed for each test method and are important building%0A     * blocks of Junit tests.%0A     *%0A     * %3Cp%3E%0A     * The annotated Activity will be launched before each annotated @Test and before any annotated%0A     * %7B@link Before @Before%7D methods. The Activity is automatically terminated after the test is%0A     * completed and all %7B@link After @After%7D methods are finished.%0A     */%0A    @Rule%0A    public ActivityTestRule%3CTextSwitcherActivity%3E mActivityTestRule =%0A            new ActivityTestRule%3C%3E(TextSwitcherActivity.class);%0A%0A    @Test%0A    public void clickButton_opensTimePickerDialog() %7B%0A        // Specifies a view with the given id that we want to interact with.%0A        ViewInteraction viewInteraction = Espresso.onView(ViewMatchers.withId(R.id.button3));%0A        // Interact with the view by performing a ViewAction.%0A        viewInteraction.perform(ViewActions.click());%0A%0A        // Obtain a Matcher that will allow us to determine if a string being examined contains%0A        // the specified string. Where does the string being examined come from? Espresso handles%0A        // that for us when we intend to search for this specified string.%0A        Matcher%3CString%3E classNameMatcher = StringContains.containsString(TIME_PICKER_VIEW_CLASS_NAME);%0A        // Specifies a view with the given class name that we want to interact with.%0A        viewInteraction = Espresso.onView(ViewMatchers.withClassName(classNameMatcher));%0A        // Specifies an assertion we want to test. Here, we convert a ViewMatcher that determines if%0A        // a view is displayed into a ViewAssertion.%0A        ViewAssertion assertion = ViewAssertions.matches(ViewMatchers.isDisplayed());%0A        // Interact with the view by checking the assertion.%0A        viewInteraction.check(assertion);%0A    %7D%0A%7D%0A

Create test to check that time picker opens.