mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/observation/TestRetrieveDeleteObsHelperImpl.java
@Test
    public void testRemoteRetrievalAllAssetsByNumberZero()
    {
        //settings
        m_SUT.setRetrieveByMaxObsNum(true);
        m_SUT.setMaxObservationNumber(0);
        
        //request for observations
        m_SUT.submitRetrieveObservationsRequest(null);
        
        //verify call to remote message sender for all asset observations
        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
        //request
        verify(m_MessageFactory).createObservationStoreMessage(
            eq(ObservationStoreMessageType.GetObservationRequest), messageCaptor.capture());
        verify(m_MessageWrapper).queue(eq(CONTROLLER_ID), eq((ResponseHandler)null));
        
        //verify data messages
        GetObservationRequestData requestData = (GetObservationRequestData)messageCaptor.getAllValues().get(0);
        Query query = requestData.getObsQuery();
        assertThat(query.hasMaxNumberOfObs(), is(false));
        assertThat(query.hasCreatedTimeRange(), is(false));
        
        assertThat(query.hasAssetType(), is(false));
    }
/**
     * Verify the remote request to retrieve Observations for all known assets and the obs number is not larger than 0.
     */
Verify the remote request to retrieve Observations for all known assets and the obs number is not larger than 0.
Verify the remote request to retrieve Observations for all known assets and the obs number is not larger than 0 .
@Test
    public void testRemoteRetrievalAllAssetsByNumberZero()
    {
        m_SUT.setRetrieveByMaxObsNum(true);
        m_SUT.setMaxObservationNumber(0);
        m_SUT.submitRetrieveObservationsRequest(null);
        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
        verify(m_MessageFactory).createObservationStoreMessage(
            eq(ObservationStoreMessageType.GetObservationRequest), messageCaptor.capture());
        verify(m_MessageWrapper).queue(eq(CONTROLLER_ID), eq((ResponseHandler)null));
        GetObservationRequestData requestData = (GetObservationRequestData)messageCaptor.getAllValues().get(0);
        Query query = requestData.getObsQuery();
        assertThat(query.hasMaxNumberOfObs(), is(false));
        assertThat(query.hasCreatedTimeRange(), is(false));
        assertThat(query.hasAssetType(), is(false));
    }
@ Test public void testRemoteRetrievalAllAssetsByNumberZero ( ) { m_SUT . setRetrieveByMaxObsNum ( true ) ; m_SUT . setMaxObservationNumber ( 0 ) ; m_SUT . submitRetrieveObservationsRequest ( null ) ; ArgumentCaptor < Message > messageCaptor = ArgumentCaptor . forClass ( Message . class ) ; verify ( m_MessageFactory ) . createObservationStoreMessage ( eq ( ObservationStoreMessageType . GetObservationRequest ) , messageCaptor . capture ( ) ) ; verify ( m_MessageWrapper ) . queue ( eq ( CONTROLLER_ID ) , eq ( ( ResponseHandler ) null ) ) ; GetObservationRequestData requestData = ( GetObservationRequestData ) messageCaptor . getAllValues ( ) . get ( 0 ) ; Query query = requestData . getObsQuery ( ) ; assertThat ( query . hasMaxNumberOfObs ( ) , is ( false ) ) ; assertThat ( query . hasCreatedTimeRange ( ) , is ( false ) ) ; assertThat ( query . hasAssetType ( ) , is ( false ) ) ; }
Verify the remote request to retrieve Observations for all known assets and the obs number is not larger than 0.
Verify the remote request to retrieve Observations for all known assets and the obs number is not larger than 0 .
//settings //request for observations //verify call to remote message sender for all asset observations //request //verify data messages