diff options
author | Eike Stepper | 2011-01-07 18:19:34 +0000 |
---|---|---|
committer | Eike Stepper | 2011-01-07 18:19:34 +0000 |
commit | 1b444a7f40246178d93268fef9c4d56c5c168003 (patch) | |
tree | aa4b042a42a6dde02e9d2cc317f4cdf0a6bdae00 /plugins/org.eclipse.emf.cdo.examples.hibernate.client | |
parent | 85526250336e72dac2ebd742219905dbbb8a2e0c (diff) | |
download | cdo-1b444a7f40246178d93268fef9c4d56c5c168003.tar.gz cdo-1b444a7f40246178d93268fef9c4d56c5c168003.tar.xz cdo-1b444a7f40246178d93268fef9c4d56c5c168003.zip |
Never use assertTrue() or assertFalse()
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.examples.hibernate.client')
3 files changed, 12 insertions, 12 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples.hibernate.client/src/org/eclipse/emf/cdo/examples/hibernate/client/CustomIDGeneratorTest.java b/plugins/org.eclipse.emf.cdo.examples.hibernate.client/src/org/eclipse/emf/cdo/examples/hibernate/client/CustomIDGeneratorTest.java index 6a5db4a2b0..76f3807030 100644 --- a/plugins/org.eclipse.emf.cdo.examples.hibernate.client/src/org/eclipse/emf/cdo/examples/hibernate/client/CustomIDGeneratorTest.java +++ b/plugins/org.eclipse.emf.cdo.examples.hibernate.client/src/org/eclipse/emf/cdo/examples/hibernate/client/CustomIDGeneratorTest.java @@ -28,7 +28,7 @@ import org.eclipse.emf.cdo.transaction.CDOTransaction; * Note this testcase will work with the hibernate mapping created using the latest version of the ecore file. When * using the generated hbm file then it does not work (as the generated hbm file does not necessarily contain the * required generator definitions). - * + * * @author Martin Taal */ public class CustomIDGeneratorTest extends BaseTest @@ -83,7 +83,7 @@ public class CustomIDGeneratorTest extends BaseTest // and the other uuid has been set assertNotNull(category2_read.getName()); - assertFalse(uuid.equals(category2_read.getName())); + assertEquals(false, uuid.equals(category2_read.getName())); transaction.commit(); session.close(); } diff --git a/plugins/org.eclipse.emf.cdo.examples.hibernate.client/src/org/eclipse/emf/cdo/examples/hibernate/client/HibernateQueryTest.java b/plugins/org.eclipse.emf.cdo.examples.hibernate.client/src/org/eclipse/emf/cdo/examples/hibernate/client/HibernateQueryTest.java index 66149678a3..1e5fb59139 100644 --- a/plugins/org.eclipse.emf.cdo.examples.hibernate.client/src/org/eclipse/emf/cdo/examples/hibernate/client/HibernateQueryTest.java +++ b/plugins/org.eclipse.emf.cdo.examples.hibernate.client/src/org/eclipse/emf/cdo/examples/hibernate/client/HibernateQueryTest.java @@ -207,7 +207,7 @@ public class HibernateQueryTest extends BaseTest found |= od.getProduct() == product; } - assertTrue(found); + assertEquals(true, found); } } else @@ -289,13 +289,13 @@ public class HibernateQueryTest extends BaseTest query.setParameter("vat", VAT.VAT15); //$NON-NLS-1$ for (Object[] values : query.getResult(Object[].class)) { - assertTrue(values[0] instanceof OrderDetail); - assertTrue(values[1] instanceof SalesOrder); - assertTrue(values[2] instanceof VAT); + assertEquals(true, values[0] instanceof OrderDetail); + assertEquals(true, values[1] instanceof SalesOrder); + assertEquals(true, values[2] instanceof VAT); assertEquals(VAT.VAT15, values[2]); - assertTrue(values[3] instanceof Float); + assertEquals(true, values[3] instanceof Float); final SalesOrder order = (SalesOrder)values[1]; - assertTrue(order.getOrderDetails().contains(values[0])); + assertEquals(true, order.getOrderDetails().contains(values[0])); } } @@ -319,11 +319,11 @@ public class HibernateQueryTest extends BaseTest // NOTE: firstResult is a special parameter for the hql query language productQuery.setParameter("firstResult", page * pageSize); //$NON-NLS-1$ final List<Product> queriedProducts = productQuery.getResult(Product.class); - assertTrue(queriedProducts.size() <= pageSize); + assertEquals(true, queriedProducts.size() <= pageSize); // a product should not have been read yet for (Product newProduct : queriedProducts) { - assertTrue(!allProducts.contains(newProduct)); + assertEquals(true, !allProducts.contains(newProduct)); } allProducts.addAll(queriedProducts); @@ -349,7 +349,7 @@ public class HibernateQueryTest extends BaseTest { final Product product = iterator.next(); // meaningless but do something - assertTrue(product != null); + assertEquals(true, product != null); counter++; if (counter == NUM_OF_PRODUCTS / 2) { diff --git a/plugins/org.eclipse.emf.cdo.examples.hibernate.client/src/org/eclipse/emf/cdo/examples/hibernate/client/QuickStartTest.java b/plugins/org.eclipse.emf.cdo.examples.hibernate.client/src/org/eclipse/emf/cdo/examples/hibernate/client/QuickStartTest.java index 89bbf72fdc..dfb54ca9f5 100644 --- a/plugins/org.eclipse.emf.cdo.examples.hibernate.client/src/org/eclipse/emf/cdo/examples/hibernate/client/QuickStartTest.java +++ b/plugins/org.eclipse.emf.cdo.examples.hibernate.client/src/org/eclipse/emf/cdo/examples/hibernate/client/QuickStartTest.java @@ -58,7 +58,7 @@ public class QuickStartTest extends BaseTest final CDOSession session = openSession(); final CDOTransaction transaction = session.openTransaction(); CDOResource resource = transaction.getResource("/res1"); //$NON-NLS-1$ - assertTrue(resource.getContents().get(0) instanceof Address); + assertEquals(true, resource.getContents().get(0) instanceof Address); assertEquals(1, resource.getContents().size()); final Address address = (Address)resource.getContents().get(0); assertEquals(addressName, address.getName()); |