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