[#3119] Upgrade to JUnit 4.11 and omit using deprecated junit.framework.Assert in tests

This commit is contained in:
Lukas Eder 2014-03-19 11:38:52 +01:00
parent 1cab1c8541
commit 0492923ff6
51 changed files with 148 additions and 150 deletions

View File

@ -41,12 +41,12 @@
package org.jooq.example;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static org.jooq.example.db.h2.Tables.AUTHOR;
import static org.jooq.example.db.h2.Tables.BOOK;
import static org.jooq.example.db.h2.Tables.BOOK_STORE;
import static org.jooq.example.db.h2.Tables.BOOK_TO_BOOK_STORE;
import static org.jooq.impl.DSL.countDistinct;
import static org.junit.Assert.assertEquals;
import org.jooq.DSLContext;
import org.jooq.Record3;

View File

@ -43,12 +43,12 @@ package org.jooq.example;
import static org.jooq.example.db.h2.Tables.BOOK;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import junit.framework.Assert;
import org.jooq.DSLContext;
import org.jooq.example.spring.BookService;
import org.junit.After;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -40,7 +40,7 @@
*/
package org.jooq.test;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.assertEquals;
import java.lang.reflect.Method;
import java.math.BigDecimal;
@ -57,8 +57,6 @@ import java.util.HashSet;
import java.util.List;
import java.util.UUID;
import junit.framework.Assert;
import org.jooq.AggregateFunction;
// ...
import org.jooq.Configuration;
@ -101,6 +99,8 @@ import org.jooq.types.UInteger;
import org.jooq.types.ULong;
import org.jooq.types.UShort;
import org.junit.Assert;
public abstract class BaseTest<
// T_AUTHOR table

View File

@ -41,7 +41,6 @@
package org.jooq.test;
import static junit.framework.Assert.assertNull;
import static org.jooq.impl.DSL.md5;
import static org.jooq.impl.DSL.val;
import static org.jooq.test.mariadb.generatedclasses.Tables.T_BOOK_TO_BOOK_STORE;
@ -65,6 +64,7 @@ import static org.jooq.util.mariadb.MariaDBDSL.uncompress;
import static org.jooq.util.mariadb.MariaDBDSL.uncompressedLength;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import java.math.BigDecimal;
import java.math.BigInteger;

View File

@ -41,7 +41,6 @@
package org.jooq.test;
import static junit.framework.Assert.assertNull;
import static org.jooq.impl.DSL.md5;
import static org.jooq.impl.DSL.val;
import static org.jooq.test.mysql.generatedclasses.Tables.T_BOOK_TO_BOOK_STORE;
@ -66,6 +65,7 @@ import static org.jooq.util.mysql.MySQLDSL.uncompress;
import static org.jooq.util.mysql.MySQLDSL.uncompressedLength;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import java.math.BigDecimal;
import java.math.BigInteger;

View File

@ -45,9 +45,6 @@ package org.jooq.test;
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxx
@ -100,8 +97,11 @@ xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxxxxxxxxxxxxxxxxx

View File

@ -42,7 +42,6 @@
package org.jooq.test;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static org.jooq.impl.DSL.inline;
import static org.jooq.impl.DSL.name;
import static org.jooq.impl.DSL.select;
@ -76,6 +75,7 @@ import static org.jooq.util.postgres.PostgresDSL.arrayPrepend;
import static org.jooq.util.postgres.PostgresDSL.arrayToString;
import static org.jooq.util.postgres.PostgresDSL.only;
import static org.jooq.util.postgres.PostgresDSL.stringToArray;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import java.math.BigDecimal;

View File

@ -44,7 +44,6 @@ package org.jooq.test;
/* [pro] xx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@ -72,6 +71,7 @@ xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxx

View File

@ -40,11 +40,11 @@
*/
package org.jooq.test._.testcases;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
// ...
import static org.jooq.impl.DSL.count;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import java.sql.Date;
import java.sql.SQLException;

View File

@ -42,8 +42,6 @@ package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static java.util.Collections.nCopies;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
// ...
// ...
import static org.jooq.SQLDialect.CUBRID;
@ -100,6 +98,8 @@ import static org.jooq.impl.DSL.sumDistinct;
import static org.jooq.impl.DSL.val;
import static org.jooq.impl.DSL.varPop;
import static org.jooq.impl.DSL.varSamp;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.math.BigDecimal;
import java.sql.Date;
@ -258,14 +258,14 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
assertEquals(2, (int) result1.get(0).value2());
assertEquals(2, (int) result1.get(0).value3());
assertEquals(1, (int) result1.get(0).value4());
assertEquals(3d, result1.get(0).getValue(4, Double.class));
assertEquals(3d, result1.get(0).getValue(4, Double.class), 0.0);
assertEquals(1, (int) result1.get(0).value7());
assertEquals(2, (int) result1.get(0).value8());
assertEquals(2, (int) result1.get(1).value2());
assertEquals(2, (int) result1.get(1).value3());
assertEquals(1, (int) result1.get(1).value4());
assertEquals(7d, result1.get(1).getValue(4, Double.class));
assertEquals(7d, result1.get(1).getValue(4, Double.class), 0.0);
assertEquals(3, (int) result1.get(1).value7());
assertEquals(4, (int) result1.get(1).value8());
@ -316,17 +316,17 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
.orderBy(TBook_AUTHOR_ID())
.fetch();
assertEquals(0.5, result2.get(0).getValue(1, Double.class));
assertEquals(0.25, result2.get(0).getValue(3, Double.class));
assertEquals(0.5, result2.get(1).getValue(1, Double.class));
assertEquals(0.25, result2.get(1).getValue(3, Double.class));
assertEquals(0.5, result2.get(0).getValue(1, Double.class), 0.0);
assertEquals(0.25, result2.get(0).getValue(3, Double.class), 0.0);
assertEquals(0.5, result2.get(1).getValue(1, Double.class), 0.0);
assertEquals(0.25, result2.get(1).getValue(3, Double.class), 0.0);
// DB2 only knows STDDEV_POP / VAR_POP
if (true/* [pro] xx xx xxxxxxxxx xx xxxxxxxxxxxxxxxx [/pro] */) {
assertEquals("0.707", result2.get(0).getValue(2, String.class).substring(0, 5));
assertEquals(0.5, result2.get(0).getValue(4, Double.class));
assertEquals(0.5, result2.get(0).getValue(4, Double.class), 0.0);
assertEquals("0.707", result2.get(1).getValue(2, String.class).substring(0, 5));
assertEquals(0.5, result2.get(1).getValue(4, Double.class));
assertEquals(0.5, result2.get(1).getValue(4, Double.class), 0.0);
}
}
}
@ -728,18 +728,18 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
// Overall STDDEV_POP(), STDDEV_SAMP(), VAR_POP(), VAR_SAMP()
assertEquals("1.118", result.get(0).getValue(1, String.class).substring(0, 5));
assertEquals(1.25, result.get(0).getValue(3, Double.class));
assertEquals(1.25, result.get(0).getValue(3, Double.class), 0.0);
// Partitioned STDDEV_POP(), STDDEV_SAMP(), VAR_POP(), VAR_SAMP()
assertEquals(0.5, result.get(0).getValue(5, Double.class));
assertEquals(0.25, result.get(0).getValue(7, Double.class));
assertEquals(0.5, result.get(0).getValue(5, Double.class), 0.0);
assertEquals(0.25, result.get(0).getValue(7, Double.class), 0.0);
// DB2 only knows STDDEV_POP / VAR_POP
if (true/* [pro] xx xx xxxxxxxxx xx xxxxxxxxxxxxxxxx [/pro] */) {
assertEquals("1.290", result.get(0).getValue(2, String.class).substring(0, 5));
assertEquals("1.666", result.get(0).getValue(4, String.class).substring(0, 5));
assertEquals("0.707", result.get(0).getValue(6, String.class).substring(0, 5));
assertEquals(0.5, result.get(0).getValue(8, Double.class));
assertEquals(0.5, result.get(0).getValue(8, Double.class), 0.0);
}
// NTILE()

View File

@ -40,8 +40,6 @@
*/
package org.jooq.test._.testcases;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNull;
import static org.jooq.impl.DSL.one;
import static org.jooq.impl.DSL.select;
import static org.jooq.impl.DSL.selectFrom;
@ -51,6 +49,8 @@ import static org.jooq.impl.DSL.table;
import static org.jooq.impl.DSL.two;
import static org.jooq.impl.DSL.val;
import static org.jooq.impl.DSL.zero;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import java.sql.Date;
import java.util.List;

View File

@ -41,12 +41,12 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.fail;
import static org.jooq.impl.DSL.delete;
import static org.jooq.impl.DSL.insertInto;
import static org.jooq.impl.DSL.selectOne;
import static org.jooq.tools.reflect.Reflect.on;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import java.sql.Connection;
import java.sql.Date;

View File

@ -41,17 +41,17 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
import static org.jooq.impl.DSL.count;
import static org.jooq.impl.DSL.table;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.sql.Date;
import java.sql.Timestamp;

View File

@ -41,10 +41,10 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
import static org.jooq.tools.reflect.Reflect.on;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.sql.Date;
import java.util.ArrayList;

View File

@ -41,10 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
// ...
// ...
import static org.jooq.SQLDialect.CUBRID;
@ -73,6 +69,10 @@ import static org.jooq.types.Unsigned.ubyte;
import static org.jooq.types.Unsigned.uint;
import static org.jooq.types.Unsigned.ulong;
import static org.jooq.types.Unsigned.ushort;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.math.BigDecimal;
import java.math.BigInteger;
@ -776,10 +776,10 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(0, ULong.class));
assertEquals(
1.0f,
create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(0, Float.class));
create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(0, Float.class), 0.0f);
assertEquals(
1.0,
create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(0, Double.class));
create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(0, Double.class), 0.0);
assertEquals(
new BigInteger("1"),
create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(0, BigInteger.class));
@ -814,10 +814,10 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(TAuthor_ID().getName(), ULong.class));
assertEquals(
1.0f,
create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(TAuthor_ID().getName(), Float.class));
create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(TAuthor_ID().getName(), Float.class), 0.0f);
assertEquals(
1.0,
create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(TAuthor_ID().getName(), Double.class));
create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(TAuthor_ID().getName(), Double.class), 0.0);
assertEquals(
new BigInteger("1"),
create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(TAuthor_ID().getName(), BigInteger.class));
@ -1322,8 +1322,8 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
if (T639_BIG_INTEGER() != null) assertEquals(new BigInteger("1234567890"), record.getValue(T639_BIG_INTEGER()));
if (T639_BYTE() != null) assertEquals(9, (byte) record.getValue(T639_BYTE()));
if (T639_DOUBLE() != null) assertEquals(10.125, (double) record.getValue(T639_DOUBLE()));
if (T639_FLOAT() != null) assertEquals(11.375f, (float) record.getValue(T639_FLOAT()));
if (T639_DOUBLE() != null) assertEquals(10.125, record.getValue(T639_DOUBLE()), 0.0);
if (T639_FLOAT() != null) assertEquals(11.375f, record.getValue(T639_FLOAT()), 0.0f);
// Various BigDecimal tests
// ------------------------

View File

@ -40,8 +40,8 @@
*/
package org.jooq.test._.testcases;
import static junit.framework.Assert.assertEquals;
import static org.jooq.tools.reflect.Reflect.on;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

View File

@ -41,16 +41,16 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;
import static org.jooq.conf.SettingsTools.executePreparedStatements;
import static org.jooq.impl.DSL.falseCondition;
import static org.jooq.impl.DSL.param;
import static org.jooq.impl.DSL.val;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.sql.Date;
import java.util.ArrayList;

View File

@ -41,8 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
import static org.jooq.impl.DSL.avg;
import static org.jooq.impl.DSL.connectByIsCycle;
import static org.jooq.impl.DSL.connectByIsLeaf;
@ -64,6 +62,8 @@ import static org.jooq.impl.DSL.table;
import static org.jooq.impl.DSL.trueCondition;
import static org.jooq.impl.DSL.two;
import static org.jooq.impl.DSL.val;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.sql.Date;
import java.util.Arrays;

View File

@ -41,12 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;
// ...
import static org.jooq.SQLDialect.H2;
// ...
@ -57,6 +51,12 @@ import static org.jooq.impl.DSL.field;
import static org.jooq.impl.DSL.selectOne;
import static org.jooq.impl.DSL.val;
import static org.jooq.tools.reflect.Reflect.on;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.math.BigDecimal;
import java.sql.Date;
@ -76,8 +76,6 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Queue;
import junit.framework.Assert;
import org.jooq.AttachableInternal;
import org.jooq.Cursor;
import org.jooq.DSLContext;
@ -124,6 +122,7 @@ import org.jooq.test._.StaticWithAnnotations;
import org.jooq.test._.StaticWithoutAnnotations;
import org.jooq.tools.jdbc.JDBCUtils;
import org.junit.Assert;
import org.junit.Test;
public class FetchTests<
@ -1992,8 +1991,8 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
assertEquals((byte) 4, rs.getByte(1));
assertEquals((short) 4, rs.getShort(1));
assertEquals(4L, rs.getLong(1));
assertEquals(4.0f, rs.getFloat(1));
assertEquals(4.0, rs.getDouble(1));
assertEquals(4.0f, rs.getFloat(1), 0.0f);
assertEquals(4.0, rs.getDouble(1), 0.0);
assertEquals(new BigDecimal("4"), rs.getBigDecimal(1));
assertEquals(0, rs.getInt(3));
@ -2031,8 +2030,8 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
assertEquals((byte) 1, rs.getByte(1));
assertEquals((short) 1, rs.getShort(1));
assertEquals(1L, rs.getLong(1));
assertEquals(1.0f, rs.getFloat(1));
assertEquals(1.0, rs.getDouble(1));
assertEquals(1.0f, rs.getFloat(1), 0.0f);
assertEquals(1.0, rs.getDouble(1), 0.0);
assertEquals(BigDecimal.ONE, rs.getBigDecimal(1));
assertEquals(0, rs.getInt(3));

View File

@ -41,9 +41,9 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
import static org.jooq.tools.StringUtils.defaultString;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.ByteArrayInputStream;
import java.io.InputStream;

View File

@ -41,9 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertTrue;
// ...
// ...
// ...
@ -132,6 +129,9 @@ import static org.jooq.impl.DSL.trunc;
import static org.jooq.impl.DSL.upper;
import static org.jooq.impl.DSL.val;
import static org.jooq.impl.DSL.year;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.math.BigDecimal;
import java.sql.Date;

View File

@ -41,11 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.fail;
import static org.jooq.impl.DSL.castNull;
import static org.jooq.impl.DSL.count;
import static org.jooq.impl.DSL.deg;
@ -57,6 +52,11 @@ import static org.jooq.impl.DSL.trim;
import static org.jooq.impl.DSL.two;
import static org.jooq.impl.DSL.val;
import static org.jooq.impl.DSL.zero;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;

View File

@ -41,7 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
// ...
import static org.jooq.SQLDialect.MARIADB;
import static org.jooq.SQLDialect.MYSQL;
@ -54,6 +53,7 @@ import static org.jooq.impl.DSL.count;
import static org.jooq.impl.DSL.one;
import static org.jooq.impl.DSL.rollup;
import static org.jooq.impl.DSL.selectOne;
import static org.junit.Assert.assertEquals;
import java.sql.Date;
import java.util.Arrays;

View File

@ -41,9 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
// ...
// ...
import static org.jooq.SQLDialect.CUBRID;
@ -74,6 +71,9 @@ import static org.jooq.impl.DSL.selectOne;
import static org.jooq.impl.DSL.tableByName;
import static org.jooq.impl.DSL.trueCondition;
import static org.jooq.impl.DSL.val;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import java.math.BigDecimal;
import java.math.BigInteger;

View File

@ -41,8 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
// ...
import static org.jooq.SQLDialect.CUBRID;
// ...
@ -60,7 +58,9 @@ import static org.jooq.impl.DSL.select;
import static org.jooq.impl.DSL.selectOne;
import static org.jooq.impl.DSL.val;
import static org.jooq.impl.DSL.zero;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.sql.Date;

View File

@ -41,16 +41,16 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
// ...
import static org.jooq.SQLDialect.CUBRID;
// ...
import static org.jooq.SQLDialect.H2;
// ...
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.math.BigDecimal;
import java.math.BigInteger;

View File

@ -41,8 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNull;
// ...
// ...
// ...
@ -53,6 +51,8 @@ import static org.jooq.impl.DSL.lower;
import static org.jooq.impl.DSL.param;
import static org.jooq.impl.DSL.table;
import static org.jooq.impl.DSL.val;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import java.sql.Date;
import java.util.Arrays;

View File

@ -41,10 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertTrue;
import static org.jooq.SQLDialect.FIREBIRD;
import static org.jooq.SQLDialect.H2;
import static org.jooq.conf.ParamType.INDEXED;
@ -59,6 +55,10 @@ import static org.jooq.impl.DSL.param;
import static org.jooq.impl.DSL.table;
import static org.jooq.impl.DSL.tableByName;
import static org.jooq.impl.DSL.val;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.sql.Date;
import java.sql.SQLException;

View File

@ -41,7 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
// ...
// ...
// ...
@ -65,6 +64,7 @@ import static org.jooq.impl.DSL.trueCondition;
import static org.jooq.impl.DSL.upper;
import static org.jooq.impl.DSL.val;
import static org.jooq.impl.DSL.zero;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;

View File

@ -40,9 +40,9 @@
*/
package org.jooq.test._.testcases;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.sql.Date;

View File

@ -41,8 +41,8 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNull;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import java.sql.Date;

View File

@ -41,17 +41,17 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;
import static org.jooq.SQLDialect.DERBY;
import static org.jooq.conf.SettingsTools.executePreparedStatements;
import static org.jooq.impl.DSL.field;
import static org.jooq.impl.DSL.inline;
import static org.jooq.impl.DSL.param;
import static org.jooq.impl.DSL.val;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.math.BigDecimal;
import java.math.BigInteger;

View File

@ -41,9 +41,9 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
import static org.jooq.SQLDialect.SQLITE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.sql.Date;
import java.sql.ResultSet;

View File

@ -41,8 +41,8 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.sql.Date;
import java.util.Comparator;

View File

@ -41,15 +41,15 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
// ...
import static org.jooq.impl.DSL.table;
import static org.jooq.impl.DSL.val;
import static org.jooq.tools.reflect.Reflect.on;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.sql.Date;
import java.util.Arrays;
@ -504,12 +504,12 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
// First record: null
// -----------------------------------------------------------------
assertEquals(null, arrays.getValue(0, TArrays_STRING()));
assertEquals(null, arrays.getValue(0, TArrays_NUMBER()));
assertEquals(null, arrays.getValue(0, TArrays_DATE()));
assertNull(arrays.getValue(0, TArrays_STRING()));
assertNull(arrays.getValue(0, TArrays_NUMBER()));
assertNull(arrays.getValue(0, TArrays_DATE()));
if (TArrays_UDT() != null) {
assertEquals(null, arrays.getValue(0, TArrays_UDT()));
assertNull(arrays.getValue(0, TArrays_UDT()));
}

View File

@ -41,7 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
// ...
import static org.jooq.impl.DSL.currentDate;
import static org.jooq.impl.DSL.inline;
@ -52,6 +51,7 @@ import static org.jooq.impl.DSL.select;
import static org.jooq.impl.DSL.trueCondition;
import static org.jooq.impl.DSL.val;
import static org.jooq.impl.DSL.zero;
import static org.junit.Assert.assertEquals;
import java.sql.Date;

View File

@ -42,10 +42,10 @@ package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static java.util.Collections.nCopies;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
import static org.jooq.impl.DSL.sum;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.math.BigDecimal;
import java.sql.Date;

View File

@ -41,8 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
// ...
import static org.jooq.impl.DSL.count;
import static org.jooq.impl.DSL.select;
@ -50,6 +48,8 @@ import static org.jooq.impl.DSL.selectOne;
import static org.jooq.impl.DSL.selectZero;
import static org.jooq.impl.DSL.trim;
import static org.jooq.impl.DSL.val;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.sql.Date;
import java.util.Vector;
@ -129,7 +129,7 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
assertTrue(asList(result.get(0).fields()).contains(f3));
assertEquals(Integer.valueOf(1), result.get(0).getValue(f1));
assertEquals(2d, result.get(0).getValue(f2));
assertEquals(2d, result.get(0).getValue(f2), 0.0);
assertEquals("test", result.get(0).getValue(f3));
}

View File

@ -40,13 +40,13 @@
*/
package org.jooq.test._.testcases;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;
import static org.jooq.SQLDialect.H2;
import static org.jooq.impl.DSL.inline;
import static org.jooq.impl.DSL.val;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

View File

@ -41,7 +41,6 @@
package org.jooq.test._.testcases;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static org.jooq.SQLDialect.CUBRID;
// ...
import static org.jooq.SQLDialect.POSTGRES;
@ -49,6 +48,7 @@ import static org.jooq.impl.DSL.dual;
import static org.jooq.impl.DSL.generateSeries;
import static org.jooq.impl.DSL.one;
import static org.jooq.impl.DSL.selectOne;
import static org.junit.Assert.assertEquals;
import java.sql.Date;
import java.util.List;

View File

@ -40,8 +40,8 @@
*/
package org.jooq.test._.testcases;
import static junit.framework.Assert.assertEquals;
import static org.jooq.SQLDialect.FIREBIRD;
import static org.junit.Assert.assertEquals;
import java.sql.Date;

View File

@ -40,12 +40,12 @@
*/
package org.jooq.test._.testcases;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.fail;
import static org.jooq.SQLDialect.CUBRID;
import static org.jooq.SQLDialect.FIREBIRD;
// ...
import static org.jooq.SQLDialect.SQLITE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import java.sql.Date;
import java.util.Arrays;

View File

@ -40,10 +40,10 @@
*/
package org.jooq.test._.testcases;
import static junit.framework.Assert.assertEquals;
import static org.jooq.impl.DSL.row;
import static org.jooq.impl.DSL.table;
import static org.jooq.impl.DSL.values;
import static org.junit.Assert.assertEquals;
import java.sql.Date;

View File

@ -23,13 +23,12 @@ package org.jooq.test._.tools;
import java.util.Stack;
import java.util.Vector;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.Text;
import org.w3c.dom.CDATASection;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.Locator;

View File

@ -201,14 +201,14 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<version>4.11</version>
<type>jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock-junit4</artifactId>
<version>2.5.1</version>
<version>2.6.0</version>
<type>jar</type>
<scope>test</scope>
</dependency>

View File

@ -51,7 +51,7 @@ import java.sql.PreparedStatement;
import java.sql.Time;
import java.sql.Timestamp;
import junit.framework.Assert;
import org.junit.Assert;
import org.jooq.BindContext;
import org.jooq.Constants;

View File

@ -41,7 +41,7 @@
package org.jooq.test;
import static junit.framework.Assert.assertTrue;
import static org.junit.Assert.assertTrue;
import static org.jooq.impl.DSL.fieldByName;
import static org.jooq.impl.DSL.val;

View File

@ -41,8 +41,8 @@
package org.jooq.test;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.fail;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import static org.jooq.impl.DSL.val;
import static org.jooq.test.data.Table1.FIELD_ID1;
import static org.jooq.test.data.Table1.FIELD_NAME1;

View File

@ -41,7 +41,7 @@
package org.jooq.test;
import static junit.framework.Assert.assertTrue;
import static org.junit.Assert.assertTrue;
import static org.jooq.impl.DSL.field;
import javax.persistence.Column;

View File

@ -41,7 +41,7 @@
package org.jooq.test;
import static junit.framework.Assert.fail;
import static org.junit.Assert.fail;
import org.jooq.test.data.Table1;
import org.jooq.test.data.Table1Record;

View File

@ -41,7 +41,7 @@
package org.jooq.test;
import static java.util.Arrays.asList;
import static junit.framework.Assert.fail;
import static org.junit.Assert.fail;
import static org.jooq.Clause.CONDITION;
import static org.jooq.Clause.CONDITION_AND;
import static org.jooq.Clause.CONDITION_BETWEEN;