mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetPageDisplayHelperImpl.java
@Test
    public void testAssetTabViewChange()
    {
        TabChangeEvent event = mock(TabChangeEvent.class);
        Tab tab = mock(Tab.class);
        UIComponent component = mock(UIComponent.class);
        Tab childComp1 = mock(Tab.class);
        Tab childComp2 = mock(Tab.class);
        
        List<UIComponent> UiChillins = new ArrayList<UIComponent>();
        UiChillins.add(childComp1);
        UiChillins.add(childComp2);
        
        when(event.getTab()).thenReturn(tab);
        when(tab.getTitle()).thenReturn("SirTitle");
        
        when(event.getComponent()).thenReturn(component);
        when(component.getChildCount()).thenReturn(2); //number of children in UiChillins
        when(component.getChildren()).thenReturn(UiChillins);
        
        when(childComp2.getTitle()).thenReturn("SirTitle");
        
        m_SUT.assetTabViewChange(event);
        assertThat(m_SUT.getAssetPageTabName(), is("SirTitle"));
        assertThat(m_SUT.getAssetPageIndex(), is(0));
    }
/**
     * Verify correct behavior of resetting active index
     * and active index name in the event of a tab view change.
     */
Verify correct behavior of resetting active index
and active index name in the event of a tab view change.
Verify correct behavior of resetting active index and active index name in the event of a tab view change .
@Test
    public void testAssetTabViewChange()
    {
        TabChangeEvent event = mock(TabChangeEvent.class);
        Tab tab = mock(Tab.class);
        UIComponent component = mock(UIComponent.class);
        Tab childComp1 = mock(Tab.class);
        Tab childComp2 = mock(Tab.class);
        List<UIComponent> UiChillins = new ArrayList<UIComponent>();
        UiChillins.add(childComp1);
        UiChillins.add(childComp2);
        when(event.getTab()).thenReturn(tab);
        when(tab.getTitle()).thenReturn("SirTitle");
        when(event.getComponent()).thenReturn(component);
        when(component.getChildCount()).thenReturn(2); 
        when(component.getChildren()).thenReturn(UiChillins);
        when(childComp2.getTitle()).thenReturn("SirTitle");
        m_SUT.assetTabViewChange(event);
        assertThat(m_SUT.getAssetPageTabName(), is("SirTitle"));
        assertThat(m_SUT.getAssetPageIndex(), is(0));
    }
@ Test public void testAssetTabViewChange ( ) { TabChangeEvent event = mock ( TabChangeEvent . class ) ; Tab tab = mock ( Tab . class ) ; UIComponent component = mock ( UIComponent . class ) ; Tab childComp1 = mock ( Tab . class ) ; Tab childComp2 = mock ( Tab . class ) ; List < UIComponent > UiChillins = new ArrayList < UIComponent > ( ) ; UiChillins . add ( childComp1 ) ; UiChillins . add ( childComp2 ) ; when ( event . getTab ( ) ) . thenReturn ( tab ) ; when ( tab . getTitle ( ) ) . thenReturn ( "SirTitle" ) ; when ( event . getComponent ( ) ) . thenReturn ( component ) ; when ( component . getChildCount ( ) ) . thenReturn ( 2 ) ; when ( component . getChildren ( ) ) . thenReturn ( UiChillins ) ; when ( childComp2 . getTitle ( ) ) . thenReturn ( "SirTitle" ) ; m_SUT . assetTabViewChange ( event ) ; assertThat ( m_SUT . getAssetPageTabName ( ) , is ( "SirTitle" ) ) ; assertThat ( m_SUT . getAssetPageIndex ( ) , is ( 0 ) ) ; }
Verify correct behavior of resetting active index
 and active index name in the event of a tab view change.
Verify correct behavior of resetting active index and active index name in the event of a tab view change .
//number of children in UiChillins