Using the InMemoryAdapter for testing, a sequence of ordering directives appears to be applied in reverse of the expected order.
As an example, take the query expression below:
Running this against the database, this produces the expected ORDER BY clause:
ORDER BY ScheduleDueDate, ActiveFlagSort, Scheduled
However, when running against the InMemoryAdapter, the sorting is applied in exactly the reverse order: First by Scheduled, then ActiveFlagSort, then ScheduleDueDate.
Adding a test related to Order By/Then By Issue #252:
Running order by clauses in reverse order to fix issue with Order By/Then by for in-memory adapter. #252: