mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/observation/TestObservationMgrImpl.java
@Test
    public void testFilterByExpressionEmptyFilter()
    {
        //settings
        m_SUT.setFilterByExpression(true);
        m_SUT.setFilter("");
        
        //request for observations
        m_SUT.getObservations().load(0, 10, null, null, null);
        
        //verify calls
        verify(m_ObsQuery, never()).withAssetUuid(Mockito.any(UUID.class));
        verify(m_ObsQuery).execute();
        //verify jdo store NOT call
        verify(m_JdoStore, never()).newJdoQuery();
        verify(m_JdoStore, never()).executeJdoQuery(Mockito.any(javax.jdo.Query.class));
        verify(m_JdoStore, never()).executeGetCount(Mockito.any(javax.jdo.Query.class));
    }
/**
     * Verify the remote request to retrieve Observations for all known assets because the filter string is empty.
     */
Verify the remote request to retrieve Observations for all known assets because the filter string is empty.
Verify the remote request to retrieve Observations for all known assets because the filter string is empty .
@Test
    public void testFilterByExpressionEmptyFilter()
    {
        m_SUT.setFilterByExpression(true);
        m_SUT.setFilter("");
        m_SUT.getObservations().load(0, 10, null, null, null);
        verify(m_ObsQuery, never()).withAssetUuid(Mockito.any(UUID.class));
        verify(m_ObsQuery).execute();
        verify(m_JdoStore, never()).newJdoQuery();
        verify(m_JdoStore, never()).executeJdoQuery(Mockito.any(javax.jdo.Query.class));
        verify(m_JdoStore, never()).executeGetCount(Mockito.any(javax.jdo.Query.class));
    }
@ Test public void testFilterByExpressionEmptyFilter ( ) { m_SUT . setFilterByExpression ( true ) ; m_SUT . setFilter ( "" ) ; m_SUT . getObservations ( ) . load ( 0 , 10 , null , null , null ) ; verify ( m_ObsQuery , never ( ) ) . withAssetUuid ( Mockito . any ( UUID . class ) ) ; verify ( m_ObsQuery ) . execute ( ) ; verify ( m_JdoStore , never ( ) ) . newJdoQuery ( ) ; verify ( m_JdoStore , never ( ) ) . executeJdoQuery ( Mockito . any ( javax . jdo . Query . class ) ) ; verify ( m_JdoStore , never ( ) ) . executeGetCount ( Mockito . any ( javax . jdo . Query . class ) ) ; }
Verify the remote request to retrieve Observations for all known assets because the filter string is empty.
Verify the remote request to retrieve Observations for all known assets because the filter string is empty .
//settings //request for observations //verify calls //verify jdo store NOT call