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