You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2014/10/22 00:58:05 UTC
svn commit: r1633483 -
/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/datatypes/BooleanIntCharTest.java
Author: tfischer
Date: Tue Oct 21 22:58:04 2014
New Revision: 1633483
URL: http://svn.apache.org/r1633483
Log:
extract fillTables() test setup in setUp() method
Modified:
db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/datatypes/BooleanIntCharTest.java
Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/datatypes/BooleanIntCharTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/datatypes/BooleanIntCharTest.java?rev=1633483&r1=1633482&r2=1633483&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/datatypes/BooleanIntCharTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/datatypes/BooleanIntCharTest.java Tue Oct 21 22:58:04 2014
@@ -39,6 +39,13 @@ import org.apache.torque.util.JdbcTypedV
*/
public class BooleanIntCharTest extends BaseDatabaseTestCase
{
+ @Override
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ fillTables();
+ }
+
/**
* Checks whether we can read boolean true values.
*
@@ -46,8 +53,6 @@ public class BooleanIntCharTest extends
*/
public void testReadBooleanIntCharTrueValue() throws Exception
{
- fillTables();
-
BintBcharType bc
= BintBcharTypePeer.retrieveByPK(new StringKey("t1"));
assertEquals(true, bc.getBintValue());
@@ -63,8 +68,6 @@ public class BooleanIntCharTest extends
*/
public void testReadBooleanIntCharFalseValue() throws Exception
{
- fillTables();
-
BintBcharType bc
= BintBcharTypePeer.retrieveByPK(new StringKey("f1"));
assertEquals(false, bc.getBintValue());
@@ -80,8 +83,6 @@ public class BooleanIntCharTest extends
*/
public void testReadBooleanIntCharNullValue() throws Exception
{
- fillTables();
-
BintBcharType bc
= BintBcharTypePeer.retrieveByPK(new StringKey("null"));
assertEquals(null, bc.getBintObjectValue());
@@ -96,7 +97,6 @@ public class BooleanIntCharTest extends
public void testInsertBooleanIntCharTrueValue() throws Exception
{
// prepare
- fillTables();
BintBcharType bc = new BintBcharType();
bc.setPrimaryKey("new");
bc.setBintValue(true);
@@ -123,7 +123,6 @@ public class BooleanIntCharTest extends
public void testInsertBooleanIntCharFalseValue() throws Exception
{
// prepare
- fillTables();
BintBcharType bc = new BintBcharType();
bc.setPrimaryKey("new");
bc.setBintValue(false);
@@ -150,7 +149,6 @@ public class BooleanIntCharTest extends
public void testInserteBooleanIntCharNullValue() throws Exception
{
// prepare
- fillTables();
BintBcharType bc = new BintBcharType();
bc.setPrimaryKey("new");
bc.setBintObjectValue(null);
@@ -173,7 +171,6 @@ public class BooleanIntCharTest extends
public void testUpdateBooleanIntCharTrueValue() throws Exception
{
// prepare
- fillTables();
BintBcharType bc
= BintBcharTypePeer.retrieveByPK(new StringKey("f1"));
bc.setBintValue(true);
@@ -200,7 +197,6 @@ public class BooleanIntCharTest extends
public void testWriteBooleanIntCharFalseValue() throws Exception
{
// prepare
- fillTables();
BintBcharType bc
= BintBcharTypePeer.retrieveByPK(new StringKey("t1"));
bc.setBintValue(false);
@@ -227,7 +223,6 @@ public class BooleanIntCharTest extends
public void testUpdateBooleanIntCharNullValue() throws Exception
{
// prepare
- fillTables();
BintBcharType bc
= BintBcharTypePeer.retrieveByPK(new StringKey("t1"));
bc.setBintObjectValue(null);
@@ -250,8 +245,6 @@ public class BooleanIntCharTest extends
*/
public void testBooleanTrueSelect() throws Exception
{
- fillTables();
-
Criteria criteria = new Criteria()
.where(BintBcharTypePeer.BCHAR_VALUE, new Boolean(true))
.and(BintBcharTypePeer.BINT_VALUE, new Boolean(true))
@@ -272,8 +265,6 @@ public class BooleanIntCharTest extends
*/
public void testBooleanFalseSelect() throws Exception
{
- fillTables();
-
Criteria criteria = new Criteria()
.where(BintBcharTypePeer.BCHAR_VALUE, new Boolean(false))
.and(BintBcharTypePeer.BINT_VALUE, new Boolean(false))
@@ -295,8 +286,6 @@ public class BooleanIntCharTest extends
*/
public void testBooleanObjectNullSelect() throws Exception
{
- fillTables();
-
Criteria criteria = new Criteria()
.where(BintBcharTypePeer.BCHAR_OBJECT_VALUE, null)
.and(BintBcharTypePeer.BINT_OBJECT_VALUE, null);
@@ -315,8 +304,6 @@ public class BooleanIntCharTest extends
*/
public void testPrimitiveNullSelect() throws Exception
{
- fillTables();
-
Criteria criteria = new Criteria()
.and(BintBcharTypePeer.BCHAR_VALUE, null)
.and(BintBcharTypePeer.BINT_VALUE, null);
@@ -335,8 +322,6 @@ public class BooleanIntCharTest extends
*/
public void testBooleanSelectViaJoins() throws Exception
{
- fillTables();
-
Criteria criteria = new Criteria();
criteria.addAlias("bc", BintBcharTypePeer.TABLE_NAME);
criteria.addJoin(
@@ -363,8 +348,6 @@ public class BooleanIntCharTest extends
*/
public void testBooleanSelectInChainedCriterionsNoHits() throws Exception
{
- fillTables();
-
// check whether complex criteria are overwritten by
// replaceBooleans
Criteria criteria = new Criteria();
@@ -395,8 +378,6 @@ public class BooleanIntCharTest extends
*/
public void testBooleanSelectInChainedCriterionsUsingOr() throws Exception
{
- fillTables();
-
Criteria criteria = new Criteria();
Criterion criterion1 = new Criterion(
BintBcharTypePeer.BCHAR_VALUE,
@@ -485,7 +466,6 @@ public class BooleanIntCharTest extends
public void testDoInsertBooleanTrueValue() throws Exception
{
// prepare
- fillTables();
ColumnValues columnValues = new ColumnValues();
columnValues.put(
BintBcharTypePeer.ID,
@@ -523,7 +503,6 @@ public class BooleanIntCharTest extends
public void testDoInsertNativeTrueValue() throws Exception
{
// prepare
- fillTables();
ColumnValues columnValues = new ColumnValues();
columnValues.put(
BintBcharTypePeer.ID,
@@ -561,7 +540,6 @@ public class BooleanIntCharTest extends
public void testDoInsertBooleanFalseValue() throws Exception
{
// prepare
- fillTables();
ColumnValues columnValues = new ColumnValues();
columnValues.put(
BintBcharTypePeer.ID,
@@ -599,7 +577,6 @@ public class BooleanIntCharTest extends
public void testDoInsertNativeFalseValue() throws Exception
{
// prepare
- fillTables();
ColumnValues columnValues = new ColumnValues();
columnValues.put(
BintBcharTypePeer.ID,
@@ -637,7 +614,6 @@ public class BooleanIntCharTest extends
public void testDoInsertBooleanNullValue() throws Exception
{
// prepare
- fillTables();
ColumnValues columnValues = new ColumnValues();
columnValues.put(
BintBcharTypePeer.ID,
@@ -673,7 +649,6 @@ public class BooleanIntCharTest extends
public void testDoInsertNativeNullValue() throws Exception
{
// prepare
- fillTables();
ColumnValues columnValues = new ColumnValues();
columnValues.put(
BintBcharTypePeer.ID,
@@ -709,7 +684,6 @@ public class BooleanIntCharTest extends
public void testDoUpdateBooleanTrueValue() throws Exception
{
// prepare
- fillTables();
ColumnValues columnValues = new ColumnValues();
columnValues.put(
BintBcharTypePeer.ID,
@@ -747,7 +721,6 @@ public class BooleanIntCharTest extends
public void testDoUpdateNativeTrueValue() throws Exception
{
// prepare
- fillTables();
ColumnValues columnValues = new ColumnValues();
columnValues.put(
BintBcharTypePeer.ID,
@@ -785,7 +758,6 @@ public class BooleanIntCharTest extends
public void testDoUpdateBooleanFalseValue() throws Exception
{
// prepare
- fillTables();
ColumnValues columnValues = new ColumnValues();
columnValues.put(
BintBcharTypePeer.ID,
@@ -823,7 +795,6 @@ public class BooleanIntCharTest extends
public void testDoUpdateNativeFalseValue() throws Exception
{
// prepare
- fillTables();
ColumnValues columnValues = new ColumnValues();
columnValues.put(
BintBcharTypePeer.ID,
@@ -861,7 +832,6 @@ public class BooleanIntCharTest extends
public void testDoUpdateBooleanNullValue() throws Exception
{
// prepare
- fillTables();
ColumnValues columnValues = new ColumnValues();
columnValues.put(
BintBcharTypePeer.ID,
@@ -891,7 +861,6 @@ public class BooleanIntCharTest extends
public void testDoUpdateNativeNullValue() throws Exception
{
// prepare
- fillTables();
ColumnValues columnValues = new ColumnValues();
columnValues.put(
BintBcharTypePeer.ID,
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org