Code example for Intent

Methods: addFlagsgetFlags

0
        assertSame(self, intent);
    } 
 
    @Test 
    public void shouldAddFlags() throws Exception { 
        Intent intent = new Intent();
        Intent self = intent.addFlags(4);
        self.addFlags(8);
        assertEquals(12, intent.getFlags());
        assertSame(self, intent);
    } 
 
    @Test 
    public void shouldSupportCategories() throws Exception { 
        Intent intent = new Intent();
        Intent self = intent.addCategory("category.name.1");
        intent.addCategory("category.name.2");
 
        assertTrue(intent.hasCategory("category.name.1"));
        assertTrue(intent.hasCategory("category.name.2"));