mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/observation/TestRelatedObservationViewImpl.java
@Test
    public void testSetCurrentNode()
    {
        //Initialize the list of viewed related observations.
        m_SUT.initialize(OBS_UUID_1);
        assertThat(m_SUT.getObservation(), is(m_GuiObs1));
        
        //Set the current observations and verify that it is actually set.
        m_SUT.setCurrentNode(OBS_UUID_2);
        assertThat(m_SUT.getObservation(), is(m_GuiObs2));
        
        //Set the current observation, verify it is set, and that the history of the other observations is stored.
        m_SUT.setCurrentNode(OBS_UUID_3);
        assertThat(m_SUT.getObservation(), is(m_GuiObs3));
        assertThat(m_SUT.canMoveBack(), is(true));
        
        //Call the back method and verify that the previous observation is returned.
        m_SUT.back();
        assertThat(m_SUT.getObservation(), is(m_GuiObs2));
        
        m_SUT.back();
        assertThat(m_SUT.getObservation(), is(m_GuiObs1));
        assertThat(m_SUT.canMoveBack(), is(false));
        assertThat(m_SUT.canMoveForward(), is(true));
        
        m_SUT.setCurrentNode(OBS_UUID_3);
        assertThat(m_SUT.getObservation(), is(m_GuiObs3));
        assertThat(m_SUT.canMoveBack(), is(true));
        assertThat(m_SUT.canMoveForward(), is(false));
    }
/**
     * Verify the set current node method sets the current observation appropriately.
     */
Verify the set current node method sets the current observation appropriately.
Verify the set current node method sets the current observation appropriately .
@Test
    public void testSetCurrentNode()
    {
        m_SUT.initialize(OBS_UUID_1);
        assertThat(m_SUT.getObservation(), is(m_GuiObs1));
        m_SUT.setCurrentNode(OBS_UUID_2);
        assertThat(m_SUT.getObservation(), is(m_GuiObs2));
        m_SUT.setCurrentNode(OBS_UUID_3);
        assertThat(m_SUT.getObservation(), is(m_GuiObs3));
        assertThat(m_SUT.canMoveBack(), is(true));
        m_SUT.back();
        assertThat(m_SUT.getObservation(), is(m_GuiObs2));
        m_SUT.back();
        assertThat(m_SUT.getObservation(), is(m_GuiObs1));
        assertThat(m_SUT.canMoveBack(), is(false));
        assertThat(m_SUT.canMoveForward(), is(true));
        m_SUT.setCurrentNode(OBS_UUID_3);
        assertThat(m_SUT.getObservation(), is(m_GuiObs3));
        assertThat(m_SUT.canMoveBack(), is(true));
        assertThat(m_SUT.canMoveForward(), is(false));
    }
@ Test public void testSetCurrentNode ( ) { m_SUT . initialize ( OBS_UUID_1 ) ; assertThat ( m_SUT . getObservation ( ) , is ( m_GuiObs1 ) ) ; m_SUT . setCurrentNode ( OBS_UUID_2 ) ; assertThat ( m_SUT . getObservation ( ) , is ( m_GuiObs2 ) ) ; m_SUT . setCurrentNode ( OBS_UUID_3 ) ; assertThat ( m_SUT . getObservation ( ) , is ( m_GuiObs3 ) ) ; assertThat ( m_SUT . canMoveBack ( ) , is ( true ) ) ; m_SUT . back ( ) ; assertThat ( m_SUT . getObservation ( ) , is ( m_GuiObs2 ) ) ; m_SUT . back ( ) ; assertThat ( m_SUT . getObservation ( ) , is ( m_GuiObs1 ) ) ; assertThat ( m_SUT . canMoveBack ( ) , is ( false ) ) ; assertThat ( m_SUT . canMoveForward ( ) , is ( true ) ) ; m_SUT . setCurrentNode ( OBS_UUID_3 ) ; assertThat ( m_SUT . getObservation ( ) , is ( m_GuiObs3 ) ) ; assertThat ( m_SUT . canMoveBack ( ) , is ( true ) ) ; assertThat ( m_SUT . canMoveForward ( ) , is ( false ) ) ; }
Verify the set current node method sets the current observation appropriately.
Verify the set current node method sets the current observation appropriately .
//Initialize the list of viewed related observations. //Set the current observations and verify that it is actually set. //Set the current observation, verify it is set, and that the history of the other observations is stored. //Call the back method and verify that the previous observation is returned.