Created
June 9, 2019 13:20
-
-
Save frogermcs/32be3aeceecac070a56a0fdff411e472 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(AndroidJUnit4.class) | |
@LargeTest | |
public class MLModelTest { | |
@Rule | |
public ActivityTestRule<ModelTestActivity> mainActivityActivityRule = new ActivityTestRule<>(ModelTestActivity.class); | |
@Test | |
public void testClassificationUI() { | |
ModelTestActivity activity = mainActivityActivityRule.getActivity(); | |
Bitmap bmp = TestUtils.getBitmapFromAsset(activity.getAssets(), "tulip.jpg"); | |
activity.classifyImage(bmp); | |
onView(withId(com.frogermcs.imageclassificationtester.test.R.id.tvClassification)) | |
.check(matches(withSubstring("Tulips"))); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment