SHARE
TWEET

Untitled

a guest Jun 20th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @RunWith(AndroidJUnit4.class)
  2. @LargeTest
  3. public class MLModelTest {
  4.  
  5.     @Rule
  6.     public ActivityTestRule<ModelTestActivity> mainActivityActivityRule = new ActivityTestRule<>(ModelTestActivity.class);
  7.  
  8.     @Test
  9.     public void testClassificationUI() {
  10.         ModelTestActivity activity = mainActivityActivityRule.getActivity();
  11.         Bitmap bmp = TestUtils.getBitmapFromAsset(activity.getAssets(), "tulip.jpg");
  12.         activity.classifyImage(bmp);
  13.  
  14.         onView(withId(com.frogermcs.imageclassificationtester.test.R.id.tvClassification))
  15.                 .check(matches(withSubstring("Tulips")));
  16.     }
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top