mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/persistence/TestObservationQueryImpl.java
@Test
    public void testSetOrderingObservedDescending()
    {
        // replay
        ObservationQuery rv = m_SUT.withOrder(SortField.ObservedTimestamp, SortOrder.Descending);
        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()).setOrdering("observedTimestamp descending");
    }
/**
     * Verify setting order to observed time and descending sets the ordering of the JDO query properly.
     */
Verify setting order to observed time and descending sets the ordering of the JDO query properly.
Verify setting order to observed time and descending sets the ordering of the JDO query properly .
@Test
    public void testSetOrderingObservedDescending()
    {
        ObservationQuery rv = m_SUT.withOrder(SortField.ObservedTimestamp, SortOrder.Descending);
        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()).setOrdering("observedTimestamp descending");
    }
@ Test public void testSetOrderingObservedDescending ( ) { ObservationQuery rv = m_SUT . withOrder ( SortField . ObservedTimestamp , SortOrder . Descending ) ; 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 ( ) ) . setOrdering ( "observedTimestamp descending" ) ; }
Verify setting order to observed time and descending sets the ordering of the JDO query properly.
Verify setting order to observed time and descending sets the ordering of the JDO query properly .
// replay // verify return value is the same object for method chaining // verify