private void processUrls(String[] urls, boolean isValid) { Vector<String> failedTests = new Vector<String>(); for (String url : urls) { mIntent.setData(Uri.parse(url)); if (mIntentHandler.intentHasValidUrl(mIntent) != isValid) { failedTests.add(url); } } assertTrue(failedTests.toString(), failedTests.isEmpty()); }
@SmallTest @Feature({"Android-AppBase"}) public void testNullUrlIntent() { mIntent.setData(null); assertTrue("Intent with null data should be valid", mIntentHandler.intentHasValidUrl(mIntent)); }