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