<commit_before>package com.lynx.fqb.select;

import java.util.Calendar;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;

import org.junit.Assert;
import org.junit.Test;

import static org.hamcrest.Matchers.*;

import com.lynx.fqb.IntegrationTestBase;
import com.lynx.fqb.Select;
import com.lynx.fqb.entity.SellOrder;
import com.lynx.fqb.entity.SellOrder_;
import com.lynx.fqb.expression.Expressions;
import com.lynx.fqb.order.Orders;
import com.lynx.fqb.path.Paths;

public class OrderedSelectITest extends IntegrationTestBase {

    @Test
    public void shouldSelectEntitiesSortedByAttributeAsc() {
        List<SellOrder> resultList = Select
                .from(SellOrder.class)
                .orderBy(Orders.of(Orders.asc(SellOrder_.id)))
                .getResultList(em);

        assertOrder(resultList, Comparator.comparing(SellOrder::getId));<commit_msg>Ordered select fixes<commit_after>package com.lynx.fqb.select;

import static org.hamcrest.Matchers.*;

import java.util.Calendar;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Optional;

import org.junit.Assert;
import org.junit.Test;

import com.lynx.fqb.IntegrationTestBase;
import com.lynx.fqb.Select;
import com.lynx.fqb.entity.SellOrder;
import com.lynx.fqb.entity.SellOrder_;
import com.lynx.fqb.expression.Expressions;
import com.lynx.fqb.order.Orders;
import com.lynx.fqb.path.Paths;

public class OrderedSelectITest extends IntegrationTestBase {

    @Test
    public void shouldSelectEntitiesSortedByAttributeAsc() {
        List<SellOrder> resultList = Select
                .from(SellOrder.class)
                .orderBy(Orders.of(Orders.asc(SellOrder_.id)))
                .getResultList(em);

        assertOrder(resultList, Comparator.comparing(SellOrder::getId));
{'fraction_non_alphanumeric': 0.10916799152093269, 'fraction_numerical': 0.0, 'mean_word_length': 3.994708994708995, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2978637', 'n_tokens_mistral': 646, 'n_tokens_neox': 636, 'n_words': 103}