Code example for View

0
        assertThat(shadowOf(viewGroup).getInterceptedTouchEvent()).isEqualTo(touchEvent);
    } 
 
    @Test 
    public void removeView_shouldRequestLayout() throws Exception { 
        View view = new View(context);
        ViewGroup viewGroup = new FrameLayout(context);
        viewGroup.addView(view);
        shadowOf(viewGroup).setDidRequestLayout(false);
 
        viewGroup.removeView(view);
        assertThat(shadowOf(viewGroup).didRequestLayout()).isTrue();
    } 
 
    @Test 
    public void removeViewAt_shouldRequestLayout() throws Exception { 
        View view = new View(context);
        ViewGroup viewGroup = new FrameLayout(context);
        viewGroup.addView(view);
        shadowOf(viewGroup).setDidRequestLayout(false);