mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/observation/TestObservationMgrImpl.java
@Test
    public void testCheckFilter()
    {
        //mocks
        FacesContext context = mock(FacesContext.class);
        UIComponent component = mock(UIComponent.class);
        
        //settings
        String filter = "filter";
        m_SUT.setFilterByExpression(true);
        m_SUT.setFilter(filter);
        
        //mock jdo store query
        javax.jdo.Query jdoQuery = mock(javax.jdo.Query.class);
        when(m_JdoStore.newJdoQuery()).thenReturn(jdoQuery);
        
        //request check
        m_SUT.checkFilter(context, component, filter);
        
        //verify call to jdo store
        verify(m_JdoStore).newJdoQuery();
        verify(jdoQuery).compile();
    }
/**
     * Verify that submitting a filter string presents the the query to the obs store for validation. 
     */
Verify that submitting a filter string presents the the query to the obs store for validation.
Verify that submitting a filter string presents the the query to the obs store for validation .
@Test
    public void testCheckFilter()
    {
        FacesContext context = mock(FacesContext.class);
        UIComponent component = mock(UIComponent.class);
        String filter = "filter";
        m_SUT.setFilterByExpression(true);
        m_SUT.setFilter(filter);
        javax.jdo.Query jdoQuery = mock(javax.jdo.Query.class);
        when(m_JdoStore.newJdoQuery()).thenReturn(jdoQuery);
        m_SUT.checkFilter(context, component, filter);
        verify(m_JdoStore).newJdoQuery();
        verify(jdoQuery).compile();
    }
@ Test public void testCheckFilter ( ) { FacesContext context = mock ( FacesContext . class ) ; UIComponent component = mock ( UIComponent . class ) ; String filter = "filter" ; m_SUT . setFilterByExpression ( true ) ; m_SUT . setFilter ( filter ) ; javax . jdo . Query jdoQuery = mock ( javax . jdo . Query . class ) ; when ( m_JdoStore . newJdoQuery ( ) ) . thenReturn ( jdoQuery ) ; m_SUT . checkFilter ( context , component , filter ) ; verify ( m_JdoStore ) . newJdoQuery ( ) ; verify ( jdoQuery ) . compile ( ) ; }
Verify that submitting a filter string presents the the query to the obs store for validation.
Verify that submitting a filter string presents the the query to the obs store for validation .
//mocks //settings //mock jdo store query //request check //verify call to jdo store