mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/persistence/TestObservationQueryImpl.java
@Test
    public void testWithAssetType()
    {
        // replay
        ObservationQuery rv = m_SUT.withAssetType("some type");
        m_SUT.execute();
        
        ArgumentCaptor<Query> query = ArgumentCaptor.forClass(Query.class);
        verify(m_DataStore).executeJdoQuery(query.capture());
        
        // verify return value is the same object for method chaining
        assertThat((ObservationQueryImpl)rv, is(m_SUT));
        
        // verify
        verify(query.getValue()).setFilter("assetType == 'some type'");
    }
/**
     * Verify calling with asset type will set the filter properly.
     */
Verify calling with asset type will set the filter properly.
Verify calling with asset type will set the filter properly .
@Test
    public void testWithAssetType()
    {
        ObservationQuery rv = m_SUT.withAssetType("some type");
        m_SUT.execute();
        ArgumentCaptor<Query> query = ArgumentCaptor.forClass(Query.class);
        verify(m_DataStore).executeJdoQuery(query.capture());
        assertThat((ObservationQueryImpl)rv, is(m_SUT));
        verify(query.getValue()).setFilter("assetType == 'some type'");
    }
@ Test public void testWithAssetType ( ) { ObservationQuery rv = m_SUT . withAssetType ( "some type" ) ; m_SUT . execute ( ) ; ArgumentCaptor < Query > query = ArgumentCaptor . forClass ( Query . class ) ; verify ( m_DataStore ) . executeJdoQuery ( query . capture ( ) ) ; assertThat ( ( ObservationQueryImpl ) rv , is ( m_SUT ) ) ; verify ( query . getValue ( ) ) . setFilter ( "assetType == 'some type'" ) ; }
Verify calling with asset type will set the filter properly.
Verify calling with asset type will set the filter properly .
// replay // verify return value is the same object for method chaining // verify