Merge pull request #7568 from amit2103/BAEL-16694

[BAEL-16694] - Fixed spring-jooq Integration Tests
This commit is contained in:
Loredana Crusoveanu 2019-08-15 12:32:51 +03:00 committed by GitHub
commit 0cbc597080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -47,12 +47,14 @@ public class QueryIntegrationTest {
.from(AUTHOR)
.join(AUTHOR_BOOK).on(AUTHOR.ID.equal(AUTHOR_BOOK.AUTHOR_ID))
.join(BOOK).on(AUTHOR_BOOK.BOOK_ID.equal(BOOK.ID))
.groupBy(AUTHOR.LAST_NAME).fetch();
.groupBy(AUTHOR.LAST_NAME)
.orderBy(AUTHOR.LAST_NAME.desc())
.fetch();
assertEquals(3, result.size());
assertEquals("Sierra", result.getValue(0, AUTHOR.LAST_NAME));
assertEquals(Integer.valueOf(2), result.getValue(0, DSL.count()));
assertEquals("Schildt", result.getValue(2, AUTHOR.LAST_NAME));
assertEquals("Bates", result.getValue(2, AUTHOR.LAST_NAME));
assertEquals(Integer.valueOf(1), result.getValue(2, DSL.count()));
}

View File

@ -49,12 +49,13 @@ public class SpringBootIntegrationTest {
.from(AUTHOR).join(AUTHOR_BOOK).on(AUTHOR.ID.equal(AUTHOR_BOOK.AUTHOR_ID))
.join(BOOK).on(AUTHOR_BOOK.BOOK_ID.equal(BOOK.ID))
.groupBy(AUTHOR.LAST_NAME)
.orderBy(AUTHOR.LAST_NAME.desc())
.fetch();
assertEquals(3, result.size());
assertEquals("Sierra", result.getValue(0, AUTHOR.LAST_NAME));
assertEquals(Integer.valueOf(2), result.getValue(0, DSL.count()));
assertEquals("Schildt", result.getValue(2, AUTHOR.LAST_NAME));
assertEquals("Bates", result.getValue(2, AUTHOR.LAST_NAME));
assertEquals(Integer.valueOf(1), result.getValue(2, DSL.count()));
}