Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@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
You can’t perform that action at this time.