Code example for Intent

Methods: getCategories

0
        assertSame(self, intent);
    } 
 
    @Test 
    public void shouldAddCategories() throws Exception { 
        Intent intent = new Intent();
        Intent self = intent.addCategory("foo");
        assertTrue(intent.getCategories().contains("foo"));
        assertSame(self, intent);
    } 
 
    @Test 
    public void shouldFillIn() throws Exception { 
        Intent intentA = new Intent();
        Intent intentB = new Intent();
 
        intentB.setAction("foo");
        Uri uri = Uri.parse("http://www.foo.com");
        intentB.setDataAndType(uri, "text/html");
        String category = "category";
        intentB.addCategory(category);