Release 2.5.0 - Factored empty group by tests out of "testGrouping()"

This commit is contained in:
Lukas Eder 2012-08-26 12:33:31 +02:00
parent f657df4cac
commit 10f8231355
2 changed files with 22 additions and 13 deletions

View File

@ -87,22 +87,26 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, I, IPK, T658,
super(delegate);
}
@Test
public void testEmptyGrouping() throws Exception {
// [#1665] Test the empty GROUP BY clause
assertEquals(1, (int) create().selectOne()
.from(TBook())
.groupBy()
.fetchOne(0, Integer.class));
// [#1665] Test the empty GROUP BY clause
assertEquals(1, (int) create().selectOne()
.from(TBook())
.groupBy()
.having("1 = 1")
.fetchOne(0, Integer.class));
}
@Test
public void testGrouping() throws Exception {
// [#1665] Test the empty GROUP BY clause
assertEquals(1, (int) create().selectOne()
.from(TBook())
.groupBy()
.fetchOne(0, Integer.class));
// [#1665] Test the empty GROUP BY clause
assertEquals(1, (int) create().selectOne()
.from(TBook())
.groupBy()
.having("1 = 1")
.fetchOne(0, Integer.class));
// Test a simple group by query
Field<Integer> count = count().as("c");
Result<Record> result = create()

View File

@ -1076,6 +1076,11 @@ public abstract class jOOQAbstractTest<
new ThreadSafetyTests(this).testConcurrentExecution();
}
@Test
public void testEmptyGrouping() throws Exception {
new GroupByTests(this).testEmptyGrouping();
}
@Test
public void testGrouping() throws Exception {
new GroupByTests(this).testGrouping();