You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by gw...@apache.org on 2007/02/27 13:54:59 UTC
svn commit: r512241 [4/5] - in /incubator/tuscany/java/cts: sdo2.1-tuscany/
sdo2.1-tuscany/src/test/java/test/sdo21/vendor/tuscany/tests/ sdo2.1/
sdo2.1/src/main/java/test/sdo21/ sdo2.1/src/main/java/test/sdo21/framework/
sdo2.1/src/main/java/test/sdo2...
Modified: incubator/tuscany/java/cts/sdo2.1/src/main/java/test/sdo21/tests/conversion/TypeConversionTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/cts/sdo2.1/src/main/java/test/sdo21/tests/conversion/TypeConversionTest.java?view=diff&rev=512241&r1=512240&r2=512241
==============================================================================
--- incubator/tuscany/java/cts/sdo2.1/src/main/java/test/sdo21/tests/conversion/TypeConversionTest.java (original)
+++ incubator/tuscany/java/cts/sdo2.1/src/main/java/test/sdo21/tests/conversion/TypeConversionTest.java Tue Feb 27 04:54:57 2007
@@ -34,27 +34,27 @@
import commonj.sdo.helper.TypeHelper;
/**
- * This test case primarily tests the type conversion matrix in section 16 of the
- * specification. There are tests for valid and invalid type conversions. Invalid
- * type conversions are expected to throw a ClassCastException as per section 3.1.13
- * of the specification.
- *
- * Some of the tests perform conversions that result in loss of information e.g. getting
- * a double property by calling getShort(). Type conversions should follow the rules of
- * the Java language and are allowed to lose information (section 3.1.3)
- *
+ * This test case primarily tests the type conversion matrix in section 16 of
+ * the specification. There are tests for valid and invalid type conversions.
+ * Invalid type conversions are expected to throw a ClassCastException as per
+ * section 3.1.13 of the specification. Some of the tests perform conversions
+ * that result in loss of information e.g. getting a double property by calling
+ * getShort(). Type conversions should follow the rules of the Java language and
+ * are allowed to lose information (section 3.1.3)
*/
-//TODO: could use expected exception function of test annotation
+// TODO: could use expected exception function of test annotation
public class TypeConversionTest extends TestCase {
/**
- * This variable is used to create unique type names to avoid name clashes in TypeHelper
+ * This variable is used to create unique type names to avoid name clashes
+ * in TypeHelper
*/
static int unique = 0;
/**
- * DateFormat is set up in the constructor as per the format in the specification.
+ * DateFormat is set up in the constructor as per the format in the
+ * specification.
*/
private DateFormat f;
@@ -64,9 +64,11 @@
private TestHelper testHelper;
/**
- * Message to use when an invalid type conversion does not throw a ClassCastException
+ * Message to use when an invalid type conversion does not throw a
+ * ClassCastException
*/
- private static final String EXPECTED_CLASS_CAST_EXCEPTION = "ClassCastException should have been thrown (invalid conversion)";
+ private static final String EXPECTED_CLASS_CAST_EXCEPTION =
+ "ClassCastException should have been thrown (invalid conversion)";
public TypeConversionTest(String string) {
super(string);
@@ -87,9 +89,9 @@
}
/**
- * Helper function for converions tests.
- * Creates a DataObject with name 'product' and data hold property
- *
+ * Helper function for converions tests. Creates a DataObject with name
+ * 'product' and data hold property
+ *
* @param strName the name of the data hold property in the created object.
* @param strType the type of the data hold property in the created object.
* @return the created DataObject.
@@ -121,9 +123,9 @@
}
/**
- * Helper function for boolean converions tests.
- * Created a DataObject with 'boolVal' boolean property
- *
+ * Helper function for boolean converions tests. Created a DataObject with
+ * 'boolVal' boolean property
+ *
* @param initialVal the initial value of the data hold property.
* @return the initialized DataObject.
*/
@@ -134,113 +136,106 @@
}
/**
- * DataObject class test.
- * Testing getting byte from DataObject with type boolean
+ * DataObject class test. Testing getting byte from DataObject with type
+ * boolean
*/
public void testBooleanGetTypeConversionByte() {
DataObject product = createBooleanObject(true);
- try {//to byte
+ try {// to byte
product.getByte("boolVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting char from DataObject with type boolean
+ * DataObject class test. Testing getting char from DataObject with type
+ * boolean
*/
public void testBooleanGetTypeConversionChar() {
DataObject product = createBooleanObject(true);
- try {//to char
+ try {// to char
product.getChar("boolVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting double from DataObject with type boolean
+ * DataObject class test. Testing getting double from DataObject with type
+ * boolean
*/
public void testBooleanGetTypeConversionDouble() {
DataObject product = createBooleanObject(true);
- try {//to double
+ try {// to double
product.getDouble("boolVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting float from DataObject with type boolean
+ * DataObject class test. Testing getting float from DataObject with type
+ * boolean
*/
public void testBooleanGetTypeConversionFloat() {
DataObject product = createBooleanObject(true);
- try {//to float
+ try {// to float
product.getFloat("boolVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting int from DataObject with type boolean
+ * DataObject class test. Testing getting int from DataObject with type
+ * boolean
*/
public void testBooleanGetTypeConversionInt() {
DataObject product = createBooleanObject(true);
try {
product.getInt("boolVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting long from DataObject with type boolean
+ * DataObject class test. Testing getting long from DataObject with type
+ * boolean
*/
public void testBooleanGetTypeConversionLong() {
DataObject product = createBooleanObject(true);
- try {//to long
+ try {// to long
product.getLong("boolVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting short from DataObject with type boolean
+ * DataObject class test. Testing getting short from DataObject with type
+ * boolean
*/
public void testBooleanGetTypeConversionShort() {
DataObject product = createBooleanObject(true);
- try {//to short
+ try {// to short
product.getShort("boolVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting string from DataObject with type boolean
+ * DataObject class test. Testing getting string from DataObject with type
+ * boolean
*/
public void testBooleanGetTypeConversionString() {
DataObject product = createBooleanObject(true);
@@ -252,69 +247,65 @@
}
/**
- * DataObject class test.
- * Testing getting bytes[] from DataObject with type boolean
+ * DataObject class test. Testing getting bytes[] from DataObject with type
+ * boolean
*/
public void testBooleanGetTypeConversionBytes() {
DataObject product = createBooleanObject(true);
- try {//to bytes[]
+ try {// to bytes[]
product.getBytes("boolVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigDecimal from DataObject with type boolean
+ * DataObject class test. Testing getting BigDecimal from DataObject with
+ * type boolean
*/
public void testBooleanGetTypeConversionBigDecimal() {
DataObject product = createBooleanObject(true);
- try {//to BigDecimal
+ try {// to BigDecimal
product.getBigDecimal("boolVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigInteger from DataObject with type boolean
+ * DataObject class test. Testing getting BigInteger from DataObject with
+ * type boolean
*/
public void testBooleanGetTypeConversionBigInteger() {
DataObject product = createBooleanObject(true);
- try {//to BigInteger
+ try {// to BigInteger
product.getBigInteger("boolVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting Date from DataObject with type boolean
+ * DataObject class test. Testing getting Date from DataObject with type
+ * boolean
*/
public void testBooleanGetTypeConversionDate() {
DataObject product = createBooleanObject(true);
- try {//to Date
+ try {// to Date
product.getDate("boolVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * Helper function for byte converions tests.
- * Creates a DataObject with 'byteVal' byte property
- *
+ * Helper function for byte converions tests. Creates a DataObject with
+ * 'byteVal' byte property
+ *
* @param initialVal the initial value of the data hold property.
* @return the initialized DataObject.
*/
@@ -325,96 +316,93 @@
}
/**
- * DataObject class test.
- * Testing getting boolean from DataObject with type byte
+ * DataObject class test. Testing getting boolean from DataObject with type
+ * byte
*/
public void testByteGetTypeConversionBoolean() {
- DataObject product = createByteObject((byte) 5);
+ DataObject product = createByteObject((byte)5);
try {
product.getBoolean("byteVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting char from DataObject with type byte
+ * DataObject class test. Testing getting char from DataObject with type
+ * byte
*/
public void testByteGetTypeConversionChar() {
- DataObject product = createByteObject((byte) 5);
+ DataObject product = createByteObject((byte)5);
try {
product.getChar("byteVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting double from DataObject with type byte
+ * DataObject class test. Testing getting double from DataObject with type
+ * byte
*/
public void testByteGetTypeConversionDouble() {
- DataObject product = createByteObject((byte) 5);
+ DataObject product = createByteObject((byte)5);
double doubleVal = product.getDouble("byteVal");
assertTrue(doubleVal == 5);
}
/**
- * DataObject class test.
- * Testing getting float from DataObject with type byte
+ * DataObject class test. Testing getting float from DataObject with type
+ * byte
*/
public void testByteGetTypeConversionFloat() {
- DataObject product = createByteObject((byte) 5);
+ DataObject product = createByteObject((byte)5);
float floatVal = product.getFloat("byteVal");
assertTrue(floatVal == 5);
}
/**
- * DataObject class test.
- * Testing getting int from DataObject with type byte
+ * DataObject class test. Testing getting int from DataObject with type byte
*/
public void testByteGetTypeConversionInt() {
- DataObject product = createByteObject((byte) 5);
+ DataObject product = createByteObject((byte)5);
int intVal = product.getInt("byteVal");
assertTrue(intVal == 5);
}
/**
- * DataObject class test.
- * Testing getting long from DataObject with type byte
+ * DataObject class test. Testing getting long from DataObject with type
+ * byte
*/
public void testByteGetTypeConversionLong() {
- DataObject product = createByteObject((byte) 5);
+ DataObject product = createByteObject((byte)5);
long longVal = product.getLong("byteVal");
assertTrue(longVal == 5);
}
/**
- * DataObject class test.
- * Testing getting short from DataObject with type byte
+ * DataObject class test. Testing getting short from DataObject with type
+ * byte
*/
public void testByteGetTypeConversionShort() {
- DataObject product = createByteObject((byte) 5);
+ DataObject product = createByteObject((byte)5);
short shortVal = product.getShort("byteVal");
assertTrue(shortVal == 5);
}
/**
- * DataObject class test.
- * Testing getting String from DataObject with type byte
+ * DataObject class test. Testing getting String from DataObject with type
+ * byte
*/
public void testByteGetTypeConversionString() {
- DataObject product = createByteObject((byte) 5);
+ DataObject product = createByteObject((byte)5);
String stringVal = product.getString("byteVal");
assertNotNull(stringVal);
@@ -422,69 +410,65 @@
}
/**
- * DataObject class test.
- * Testing getting bytes[] from DataObject with type byte
+ * DataObject class test. Testing getting bytes[] from DataObject with type
+ * byte
*/
public void testByteGetTypeConversionBytes() {
- DataObject product = createByteObject((byte) 5);
+ DataObject product = createByteObject((byte)5);
try {
product.getBytes("byteVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigDecimal from DataObject with type byte
+ * DataObject class test. Testing getting BigDecimal from DataObject with
+ * type byte
*/
public void testByteGetTypeConversionBigDecimal() {
- DataObject product = createByteObject((byte) 5);
+ DataObject product = createByteObject((byte)5);
try {
product.getBigDecimal("byteVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigInteger from DataObject with type byte
+ * DataObject class test. Testing getting BigInteger from DataObject with
+ * type byte
*/
public void testByteGetTypeConversionBigInteger() {
- DataObject product = createByteObject((byte) 5);
+ DataObject product = createByteObject((byte)5);
try {
product.getBigInteger("byteVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting Date from DataObject with type byte
+ * DataObject class test. Testing getting Date from DataObject with type
+ * byte
*/
public void testByteGetTypeConversionDate() {
- DataObject product = createByteObject((byte) 5);
+ DataObject product = createByteObject((byte)5);
try {
product.getDate("byteVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * Helper function for char converions tests.
- * Creates a DataObject with 'charVal' char property
- *
+ * Helper function for char converions tests. Creates a DataObject with
+ * 'charVal' char property
+ *
* @param initialVal the initial value of the data hold property.
* @return the initialized DataObject.
*/
@@ -495,113 +479,105 @@
}
/**
- * DataObject class test.
- * Testing getting boolean from DataObject with type char
+ * DataObject class test. Testing getting boolean from DataObject with type
+ * char
*/
public void testCharGetTypeConversionBoolean() {
DataObject product = createCharObject('s');
try {
product.getBoolean("charVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting byte from DataObject with type char
+ * DataObject class test. Testing getting byte from DataObject with type
+ * char
*/
public void testCharGetTypeConversionByte() {
DataObject product = createCharObject('s');
try {
product.getByte("charVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting double from DataObject with type char
+ * DataObject class test. Testing getting double from DataObject with type
+ * char
*/
public void testCharGetTypeConversionDouble() {
DataObject product = createCharObject('s');
try {
product.getDouble("charVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting float from DataObject with type char
+ * DataObject class test. Testing getting float from DataObject with type
+ * char
*/
public void testCharGetTypeConversionFloat() {
DataObject product = createCharObject('s');
try {
product.getFloat("charVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting int from DataObject with type char
+ * DataObject class test. Testing getting int from DataObject with type char
*/
public void testCharGetTypeConversionInt() {
DataObject product = createCharObject('s');
try {
product.getInt("charVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting long from DataObject with type char
+ * DataObject class test. Testing getting long from DataObject with type
+ * char
*/
public void testCharGetTypeConversionLong() {
DataObject product = createCharObject('s');
try {
product.getLong("charVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting short from DataObject with type char
+ * DataObject class test. Testing getting short from DataObject with type
+ * char
*/
public void testCharGetTypeConversionShort() {
DataObject product = createCharObject('s');
try {
product.getShort("charVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting string from DataObject with type char
+ * DataObject class test. Testing getting string from DataObject with type
+ * char
*/
public void testCharGetTypeConversionString() {
DataObject product = createCharObject('s');
@@ -612,69 +588,65 @@
}
/**
- * DataObject class test.
- * Testing getting bytes[] from DataObject with type char
+ * DataObject class test. Testing getting bytes[] from DataObject with type
+ * char
*/
public void testCharGetTypeConversionBytes() {
DataObject product = createCharObject('s');
try {
product.getBytes("charVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigDecimal from DataObject with type char
+ * DataObject class test. Testing getting BigDecimal from DataObject with
+ * type char
*/
public void testCharGetTypeConversionBigDecimal() {
DataObject product = createCharObject('s');
try {
product.getBigDecimal("charVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigInteger from DataObject with type char
+ * DataObject class test. Testing getting BigInteger from DataObject with
+ * type char
*/
public void testCharGetTypeConversionBigInteger() {
DataObject product = createCharObject('s');
try {
product.getBigInteger("charVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting Date from DataObject with type char
+ * DataObject class test. Testing getting Date from DataObject with type
+ * char
*/
public void testCharGetTypeConversionDate() {
DataObject product = createCharObject('s');
try {
product.getDate("charVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * Helper function for Double converions tests.
- * Creates a DataObject with 'doubleVal' double property.
- *
+ * Helper function for Double converions tests. Creates a DataObject with
+ * 'doubleVal' double property.
+ *
* @param initialVal the initial value of the data hold property.
* @return the initialized DataObject.
*/
@@ -685,23 +657,22 @@
}
/**
- * DataObject class test.
- * Testing getting boolean from DataObject with type double
+ * DataObject class test. Testing getting boolean from DataObject with type
+ * double
*/
public void testDoubleGetTypeConversionBoolean() {
DataObject product = createDoubleObject(5);
try {
product.getBoolean("doubleVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting byte from DataObject with type double
+ * DataObject class test. Testing getting byte from DataObject with type
+ * double
*/
public void testDoubleGetTypeConversionByte() {
DataObject product1 = createDoubleObject(5);
@@ -711,72 +682,71 @@
int largeValue = Byte.MAX_VALUE + 1;
DataObject product = createDoubleObject(largeValue);
byte b = product.getByte("doubleVal");
- assertEquals( (byte)largeValue, b );
+ assertEquals((byte)largeValue, b);
}
/**
- * DataObject class test.
- * Testing getting char from DataObject with type double
+ * DataObject class test. Testing getting char from DataObject with type
+ * double
*/
public void testDoubleGetTypeConversionChar() {
DataObject product = createDoubleObject(5);
try {
product.getChar("doubleVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting float from DataObject with type double
+ * DataObject class test. Testing getting float from DataObject with type
+ * double
*/
public void testDoubleGetTypeConversionFloat() {
DataObject product1 = createDoubleObject(5);
float floatVal = product1.getFloat("doubleVal");
assertTrue(floatVal == 5.0F);
- double largeValue = ((double) Float.MAX_VALUE) + 1.0;
+ double largeValue = ((double)Float.MAX_VALUE) + 1.0;
DataObject product = createDoubleObject(largeValue);
float f = product.getFloat("doubleVal");
- assertEquals( (float)largeValue, f);
+ assertEquals((float)largeValue, f);
}
/**
- * DataObject class test.
- * Testing getting int from DataObject with type double
+ * DataObject class test. Testing getting int from DataObject with type
+ * double
*/
public void testDoubleGetTypeConversionInt() {
DataObject product1 = createDoubleObject(5);
int intVal = product1.getInt("doubleVal");
assertEquals(5, intVal);
- double largeValue = ((double) Integer.MAX_VALUE) + 1.0;
+ double largeValue = ((double)Integer.MAX_VALUE) + 1.0;
DataObject product = createDoubleObject(largeValue);
int value = product.getInt("doubleVal");
- assertEquals( (int)largeValue, value );
+ assertEquals((int)largeValue, value);
}
/**
- * DataObject class test.
- * Testing getting long from DataObject with type double
+ * DataObject class test. Testing getting long from DataObject with type
+ * double
*/
public void testDoubleGetTypeConversionLong() {
DataObject product1 = createDoubleObject(5);
long longVal = product1.getLong("doubleVal");
assertEquals(5, longVal);
- double largeValue = ((double) Long.MAX_VALUE) + 1.0;
+ double largeValue = ((double)Long.MAX_VALUE) + 1.0;
DataObject product = createDoubleObject(largeValue);
long l = product.getLong("doubleVal");
- assertEquals( (long)largeValue, l );
+ assertEquals((long)largeValue, l);
}
/**
- * DataObject class test.
- * Testing getting short from DataObject with type double
+ * DataObject class test. Testing getting short from DataObject with type
+ * double
*/
public void testDoubleGetTypeConversionShort() {
DataObject product1 = createDoubleObject(5);
@@ -786,12 +756,12 @@
int largeValue = Short.MAX_VALUE + 1;
DataObject product = createDoubleObject(largeValue);
short s = product.getShort("doubleVal");
- assertEquals( (short)largeValue, s );
+ assertEquals((short)largeValue, s);
}
/**
- * DataObject class test.
- * Testing getting string from DataObject with type double
+ * DataObject class test. Testing getting string from DataObject with type
+ * double
*/
public void testDoubleGetTypeConversionString() {
DataObject product = createDoubleObject(5);
@@ -800,23 +770,22 @@
}
/**
- * DataObject class test.
- * Testing getting bytes[] from DataObject with type double
+ * DataObject class test. Testing getting bytes[] from DataObject with type
+ * double
*/
public void testDoubleGetTypeConversionBytes() {
DataObject product = createDoubleObject(5);
try {
product.getBytes("doubleVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting Bigdecimal from DataObject with type double
+ * DataObject class test. Testing getting Bigdecimal from DataObject with
+ * type double
*/
public void testDoubleGetTypeConversionBigDecimal() {
DataObject product = createDoubleObject(5);
@@ -826,8 +795,8 @@
}
/**
- * DataObject class test.
- * Testing getting BigInteger from DataObject with type double
+ * DataObject class test. Testing getting BigInteger from DataObject with
+ * type double
*/
public void testDoubleGetTypeConversionBigInteger() {
DataObject product = createDoubleObject(5);
@@ -837,24 +806,23 @@
}
/**
- * DataObject class test.
- * Testing getting date from DataObject with type double
+ * DataObject class test. Testing getting date from DataObject with type
+ * double
*/
public void testDoubleGetTypeConversionDate() {
DataObject product = createDoubleObject(5);
try {
product.getDate("doubleVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * Helper function for Float converions tests.
- * Creates a DataObject with 'floatVal' float property
- *
+ * Helper function for Float converions tests. Creates a DataObject with
+ * 'floatVal' float property
+ *
* @param initialVal the initial value of the data hold property.
* @return the initialized DataObject.
*/
@@ -865,23 +833,22 @@
}
/**
- * DataObject class test.
- * Testing getting boolean from DataObject with type float
+ * DataObject class test. Testing getting boolean from DataObject with type
+ * float
*/
public void testFloatGetTypeConversionBoolean() {
DataObject product = createFloatObject(5);
try {
product.getBoolean("floatVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting byte from DataObject with type float
+ * DataObject class test. Testing getting byte from DataObject with type
+ * float
*/
public void testFloatGetTypeConversionByte() {
DataObject product1 = createFloatObject(5);
@@ -891,27 +858,26 @@
float value = 5.5F;
DataObject product = createFloatObject(value);
byte b = product.getByte("floatVal");
- assertEquals( (byte)value, b );
+ assertEquals((byte)value, b);
}
/**
- * DataObject class test.
- * Testing getting char from DataObject with type float
+ * DataObject class test. Testing getting char from DataObject with type
+ * float
*/
public void testFloatGetTypeConversionChar() {
DataObject product = createFloatObject(5);
try {
product.getChar("floatVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting double from DataObject with type float
+ * DataObject class test. Testing getting double from DataObject with type
+ * float
*/
public void testFloatGetTypeConversionDouble() {
DataObject product1 = createFloatObject(5);
@@ -921,12 +887,12 @@
float value = 5.5F;
DataObject product = createFloatObject(value);
double d = product.getDouble("floatVal");
- assertEquals( (double)value, d );
+ assertEquals((double)value, d);
}
/**
- * DataObject class test.
- * Testing getting int from DataObject with type float
+ * DataObject class test. Testing getting int from DataObject with type
+ * float
*/
public void testFloatGetTypeConversionInt() {
DataObject product1 = createFloatObject(5);
@@ -936,12 +902,12 @@
float value = 5.5F;
DataObject product = createFloatObject(value);
int i = product.getInt("floatVal");
- assertEquals( (int)value, i );
+ assertEquals((int)value, i);
}
/**
- * DataObject class test.
- * Testing getting long from DataObject with type float
+ * DataObject class test. Testing getting long from DataObject with type
+ * float
*/
public void testFloatGetTypeConversionLong() {
DataObject product1 = createFloatObject(5);
@@ -951,12 +917,12 @@
float f = 5.5F;
DataObject product = createFloatObject(f);
long l = product.getLong("floatVal");
- assertEquals( (long)f, l );
+ assertEquals((long)f, l);
}
/**
- * DataObject class test.
- * Testing getting short from DataObject with type float
+ * DataObject class test. Testing getting short from DataObject with type
+ * float
*/
public void testFloatGetTypeConversionShort() {
@@ -967,12 +933,12 @@
float value = 5.5F;
DataObject product = createFloatObject(value);
short s = product.getShort("floatVal");
- assertEquals( (short)value, s );
+ assertEquals((short)value, s);
}
/**
- * DataObject class test.
- * Testing getting string from DataObject with type float
+ * DataObject class test. Testing getting string from DataObject with type
+ * float
*/
public void testFloatGetTypeConversionString() {
DataObject product = createFloatObject(5.5F);
@@ -981,23 +947,22 @@
}
/**
- * DataObject class test.
- * Testing getting bytes[] from DataObject with type float
+ * DataObject class test. Testing getting bytes[] from DataObject with type
+ * float
*/
public void testFloatGetTypeConversionBytes() {
DataObject product = createFloatObject(5);
try {
product.getBytes("floatVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigDecimal from DataObject with type float
+ * DataObject class test. Testing getting BigDecimal from DataObject with
+ * type float
*/
public void testFloatGetTypeConversionBigDecimal() {
DataObject product = createFloatObject(5.5F);
@@ -1006,8 +971,8 @@
}
/**
- * DataObject class test.
- * Testing getting BigInteger from DataObject with type float
+ * DataObject class test. Testing getting BigInteger from DataObject with
+ * type float
*/
public void testFloatGetTypeConversionBigInteger() {
DataObject product1 = createFloatObject(5);
@@ -1017,28 +982,27 @@
float value = 5.5F;
DataObject product = createFloatObject(value);
BigInteger big = product.getBigInteger("floatVal");
- assertEquals( new BigInteger(""+(int)value), big );
+ assertEquals(new BigInteger("" + (int)value), big);
}
/**
- * DataObject class test.
- * Testing getting date from DataObject with type float
+ * DataObject class test. Testing getting date from DataObject with type
+ * float
*/
public void testFloatGetTypeConversionDate() {
DataObject product = createFloatObject(5);
try {
product.getDate("floatVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * Helper function for int converions tests.
- * Creates a DataObject with 'intVal' int property
- *
+ * Helper function for int converions tests. Creates a DataObject with
+ * 'intVal' int property
+ *
* @param initialVal the initial value of the data hold property.
* @return the initialized DataObject.
*/
@@ -1049,23 +1013,21 @@
}
/**
- * DataObject class test.
- * Testing getting boolean from DataObject with type int
+ * DataObject class test. Testing getting boolean from DataObject with type
+ * int
*/
public void testIntGetTypeConversionBoolean() {
DataObject product = createIntObject(5);
try {
product.getBoolean("intVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting byte from DataObject with type int
+ * DataObject class test. Testing getting byte from DataObject with type int
*/
public void testIntGetTypeConversionByte() {
DataObject product1 = createIntObject(5);
@@ -1075,27 +1037,25 @@
int value = Byte.MAX_VALUE + 1;
DataObject product = createIntObject(value);
byte b = product.getByte("intVal");
- assertEquals( (byte)value, b );
+ assertEquals((byte)value, b);
}
/**
- * DataObject class test.
- * Testing getting char from DataObject with type int
+ * DataObject class test. Testing getting char from DataObject with type int
*/
public void testIntGetTypeConversionChar() {
DataObject product = createIntObject(5);
try {
product.getChar("intVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting double from DataObject with type int
+ * DataObject class test. Testing getting double from DataObject with type
+ * int
*/
public void testIntGetTypeConversionDouble() {
DataObject product = createIntObject(5);
@@ -1104,8 +1064,8 @@
}
/**
- * DataObject class test.
- * Testing getting float from DataObject with type int
+ * DataObject class test. Testing getting float from DataObject with type
+ * int
*/
public void testIntGetTypeConversionFloat() {
DataObject product1 = createIntObject(5);
@@ -1114,8 +1074,7 @@
}
/**
- * DataObject class test.
- * Testing getting long from DataObject with type int
+ * DataObject class test. Testing getting long from DataObject with type int
*/
public void testIntGetTypeConversionLong() {
DataObject product = createIntObject(5);
@@ -1124,8 +1083,8 @@
}
/**
- * DataObject class test.
- * Testing getting short from DataObject with type int
+ * DataObject class test. Testing getting short from DataObject with type
+ * int
*/
public void testIntGetTypeConversionShort() {
DataObject product1 = createIntObject(5);
@@ -1135,12 +1094,12 @@
int value = Short.MAX_VALUE + 1;
DataObject product = createIntObject(value);
short s = product.getShort("intVal");
- assertEquals( (short)value, s );
+ assertEquals((short)value, s);
}
/**
- * DataObject class test.
- * Testing getting string from DataObject with type int
+ * DataObject class test. Testing getting string from DataObject with type
+ * int
*/
public void testIntGetTypeConversionString() {
DataObject product = createIntObject(5);
@@ -1149,23 +1108,22 @@
}
/**
- * DataObject class test.
- * Testing getting bytes[] from DataObject with type int
+ * DataObject class test. Testing getting bytes[] from DataObject with type
+ * int
*/
public void testIntGetTypeConversionBytes() {
DataObject product = createIntObject(5);
try {
product.getBytes("intVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigDecimal from DataObject with type int
+ * DataObject class test. Testing getting BigDecimal from DataObject with
+ * type int
*/
public void testIntGetTypeConversionBigDecimal() {
DataObject product1 = createIntObject(5);
@@ -1174,8 +1132,8 @@
}
/**
- * DataObject class test.
- * Testing getting BigInteger from DataObject with type int
+ * DataObject class test. Testing getting BigInteger from DataObject with
+ * type int
*/
public void testIntGetTypeConversionBigInteger() {
DataObject product = createIntObject(5);
@@ -1184,24 +1142,22 @@
}
/**
- * DataObject class test.
- * Testing getting date from DataObject with type int
+ * DataObject class test. Testing getting date from DataObject with type int
*/
public void testIntGetTypeConversionDate() {
DataObject product = createIntObject(5);
try {
product.getDate("intVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * Helper function for Long converions tests.
- * Creates a DataObject with 'longVal' long property.
- *
+ * Helper function for Long converions tests. Creates a DataObject with
+ * 'longVal' long property.
+ *
* @param initialVal the initial value of the data hold property.
* @return the initialized DataObject.
*/
@@ -1212,23 +1168,22 @@
}
/**
- * DataObject class test.
- * Testing getting boolean from DataObject with type long
+ * DataObject class test. Testing getting boolean from DataObject with type
+ * long
*/
public void testLongGetTypeConversionBoolean() {
DataObject product = createLongObject(5);
try {
product.getBoolean("longVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting byte from DataObject with type long
+ * DataObject class test. Testing getting byte from DataObject with type
+ * long
*/
public void testLongGetTypeConversionByte() {
DataObject product1 = createLongObject(5);
@@ -1238,27 +1193,26 @@
int value = Byte.MAX_VALUE + 1;
DataObject product = createLongObject(value);
byte b = product.getByte("longVal");
- assertEquals( (byte)value, b );
+ assertEquals((byte)value, b);
}
/**
- * DataObject class test.
- * Testing getting char from DataObject with type long
+ * DataObject class test. Testing getting char from DataObject with type
+ * long
*/
public void testLongGetTypeConversionChar() {
DataObject product = createLongObject(5);
try {
product.getChar("longVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting double from DataObject with type long
+ * DataObject class test. Testing getting double from DataObject with type
+ * long
*/
public void testLongGetTypeConversionDouble() {
DataObject product = createLongObject(5);
@@ -1267,8 +1221,8 @@
}
/**
- * DataObject class test.
- * Testing getting float from DataObject with type long
+ * DataObject class test. Testing getting float from DataObject with type
+ * long
*/
public void testLongGetTypeConversionFloat() {
DataObject product1 = createLongObject(5);
@@ -1277,8 +1231,7 @@
}
/**
- * DataObject class test.
- * Testing getting int from DataObject with type long
+ * DataObject class test. Testing getting int from DataObject with type long
*/
public void testLongGetTypeConversionInt() {
DataObject product1 = createLongObject(5);
@@ -1288,12 +1241,12 @@
long value = Long.MAX_VALUE;
DataObject product = createLongObject(value);
int i = product.getInt("longVal");
- assertEquals( (int)value, i );
+ assertEquals((int)value, i);
}
/**
- * DataObject class test.
- * Testing getting short from DataObject with type long
+ * DataObject class test. Testing getting short from DataObject with type
+ * long
*/
public void testLongGetTypeConversionShort() {
DataObject product1 = createLongObject(5);
@@ -1303,12 +1256,12 @@
int value = Short.MAX_VALUE + 1;
DataObject product = createLongObject(value);
short s = product.getShort("longVal");
- assertEquals( (short) value, s );
+ assertEquals((short)value, s);
}
/**
- * DataObject class test.
- * Testing getting string from DataObject with type long
+ * DataObject class test. Testing getting string from DataObject with type
+ * long
*/
public void testLongGetTypeConversionString() {
DataObject product = createLongObject(5);
@@ -1317,23 +1270,22 @@
}
/**
- * DataObject class test.
- * Testing getting bytes[] from DataObject with type long
+ * DataObject class test. Testing getting bytes[] from DataObject with type
+ * long
*/
public void testLongGetTypeConversionBytes() {
DataObject product = createLongObject(5);
try {
product.getBytes("longVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigDecimal from DataObject with type long
+ * DataObject class test. Testing getting BigDecimal from DataObject with
+ * type long
*/
public void testLongGetTypeConversionBigDecimal() {
DataObject product = createLongObject(5);
@@ -1342,8 +1294,8 @@
}
/**
- * DataObject class test.
- * Testing getting BigInteger from DataObject with type long
+ * DataObject class test. Testing getting BigInteger from DataObject with
+ * type long
*/
public void testLongGetTypeConversionBigInteger() {
DataObject product1 = createLongObject(5);
@@ -1352,8 +1304,8 @@
}
/**
- * DataObject class test.
- * Testing getting date from DataObject with type long
+ * DataObject class test. Testing getting date from DataObject with type
+ * long
*/
public void testLongGetTypeConversionDate() {
Date dateNow = new Date();
@@ -1363,9 +1315,9 @@
}
/**
- * Helper function for short converions tests.
- * Creates a DataObject with 'shortVal' short property
- *
+ * Helper function for short converions tests. Creates a DataObject with
+ * 'shortVal' short property
+ *
* @param initialVal the initial value of the data hold property.
* @return the initialized DataObject.
*/
@@ -1376,167 +1328,161 @@
}
/**
- * DataObject class test.
- * Testing getting boolean from DataObject with type short
+ * DataObject class test. Testing getting boolean from DataObject with type
+ * short
*/
public void testShortGetTypeConversionBoolean() {
- DataObject product = createShortObject((short) 5);
+ DataObject product = createShortObject((short)5);
try {
product.getBoolean("shortVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting byte from DataObject with type short
+ * DataObject class test. Testing getting byte from DataObject with type
+ * short
*/
public void testShortGetTypeConversionByte() {
- DataObject product1 = createShortObject((short) 5);
+ DataObject product1 = createShortObject((short)5);
byte byteVal = product1.getByte("shortVal");
assertTrue(byteVal == 5);
short value = (Byte.MAX_VALUE + 1);
DataObject product = createShortObject(value);
byte b = product.getByte("shortVal");
- assertEquals( (byte)value, b );
+ assertEquals((byte)value, b);
}
/**
- * DataObject class test.
- * Testing getting char from DataObject with type short
+ * DataObject class test. Testing getting char from DataObject with type
+ * short
*/
public void testShortGetTypeConversionChar() {
- DataObject product = createShortObject((short) 5);
+ DataObject product = createShortObject((short)5);
try {
product.getChar("shortVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting double from DataObject with type short
+ * DataObject class test. Testing getting double from DataObject with type
+ * short
*/
public void testShortGetTypeConversionDouble() {
- DataObject product = createShortObject((short) 5);
+ DataObject product = createShortObject((short)5);
double doubleVal = product.getDouble("shortVal");
assertTrue(doubleVal == 5);
}
/**
- * DataObject class test.
- * Testing getting float from DataObject with type short
+ * DataObject class test. Testing getting float from DataObject with type
+ * short
*/
public void testShortGetTypeConversionFloat() {
- DataObject product = createShortObject((short) 5);
+ DataObject product = createShortObject((short)5);
float floatVal = product.getFloat("shortVal");
assertTrue(floatVal == 5);
}
/**
- * DataObject class test.
- * Testing getting int from DataObject with type short
+ * DataObject class test. Testing getting int from DataObject with type
+ * short
*/
public void testShortGetTypeConversionInt() {
- DataObject product = createShortObject((short) 5);
+ DataObject product = createShortObject((short)5);
int intVal = product.getInt("shortVal");
assertTrue(intVal == 5);
}
/**
- * DataObject class test.
- * Testing getting long from DataObject with type short
+ * DataObject class test. Testing getting long from DataObject with type
+ * short
*/
public void testShortGetTypeConversionLong() {
- DataObject product = createShortObject((short) 5);
+ DataObject product = createShortObject((short)5);
long longVal = product.getLong("shortVal");
assertTrue(longVal == 5);
}
/**
- * DataObject class test.
- * Testing getting string from DataObject with type short
+ * DataObject class test. Testing getting string from DataObject with type
+ * short
*/
public void testShortGetTypeConversionString() {
- DataObject product = createShortObject((short) 5);
+ DataObject product = createShortObject((short)5);
String strVal = product.getString("shortVal");
assertEquals("5", strVal);
}
/**
- * DataObject class test.
- * Testing getting bytes[] from DataObject with type short
+ * DataObject class test. Testing getting bytes[] from DataObject with type
+ * short
*/
public void testShortGetTypeConversionBytes() {
- DataObject product = createShortObject((short) 5);
+ DataObject product = createShortObject((short)5);
try {
product.getBytes("shortVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigDecimal from DataObject with type short
+ * DataObject class test. Testing getting BigDecimal from DataObject with
+ * type short
*/
public void testShortGetTypeConversionBigDecimal() {
- DataObject product = createShortObject((short) 5);
+ DataObject product = createShortObject((short)5);
try {
product.getBigDecimal("shortVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigInteger from DataObject with type short
+ * DataObject class test. Testing getting BigInteger from DataObject with
+ * type short
*/
public void testShortGetTypeConversionBigInteger() {
- DataObject product = createShortObject((short) 5);
+ DataObject product = createShortObject((short)5);
try {
product.getBigInteger("shortVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting date from DataObject with type short
+ * DataObject class test. Testing getting date from DataObject with type
+ * short
*/
public void testShortGetTypeConversionDate() {
- DataObject product = createShortObject((short) 5);
+ DataObject product = createShortObject((short)5);
try {
product.getDate("shortVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * Helper function for short converions tests.
- * Creates a DataObject with 'stringVal' string property
- *
+ * Helper function for short converions tests. Creates a DataObject with
+ * 'stringVal' string property
+ *
* @param initialVal the initial value of the data hold property.
* @return the initialized DataObject.
*/
@@ -1547,8 +1493,8 @@
}
/**
- * DataObject class test.
- * Testing getting boolean from DataObject with type string
+ * DataObject class test. Testing getting boolean from DataObject with type
+ * string
*/
public void testStringGetTypeConversionBoolean() {
DataObject product = createStringObject("true");
@@ -1563,16 +1509,15 @@
try {
product2.getBoolean("stringVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting byte from DataObject with type string
+ * DataObject class test. Testing getting byte from DataObject with type
+ * string
*/
public void testStringGetTypeConversionByte() {
DataObject product = createStringObject("5");
@@ -1583,16 +1528,15 @@
try {
product2.getByte("stringVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting char from DataObject with type string
+ * DataObject class test. Testing getting char from DataObject with type
+ * string
*/
public void testStringGetTypeConversionChar() {
DataObject product = createStringObject("string");
@@ -1601,8 +1545,8 @@
}
/**
- * DataObject class test.
- * Testing getting double from DataObject with type string
+ * DataObject class test. Testing getting double from DataObject with type
+ * string
*/
public void testStringGetTypeConversionDouble() {
DataObject product = createStringObject("5");
@@ -1613,16 +1557,15 @@
try {
product2.getDouble("stringVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting float from DataObject with type string
+ * DataObject class test. Testing getting float from DataObject with type
+ * string
*/
public void testStringGetTypeConversionFloat() {
DataObject product = createStringObject("5.5");
@@ -1633,16 +1576,15 @@
try {
product2.getFloat("stringVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting int from DataObject with type string
+ * DataObject class test. Testing getting int from DataObject with type
+ * string
*/
public void testStringGetTypeConversionInt() {
DataObject product = createStringObject("5");
@@ -1653,16 +1595,15 @@
try {
product2.getInt("stringVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting boolean from DataObject with type string
+ * DataObject class test. Testing getting boolean from DataObject with type
+ * string
*/
public void testStringGetTypeConversionLong() {
DataObject product = createStringObject("5");
@@ -1673,16 +1614,15 @@
try {
product2.getLong("stringVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting short from DataObject with type string
+ * DataObject class test. Testing getting short from DataObject with type
+ * string
*/
public void testStringGetTypeConversionShort() {
DataObject product = createStringObject("5");
@@ -1693,16 +1633,15 @@
try {
product2.getShort("stringVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting bytes from DataObject with type string
+ * DataObject class test. Testing getting bytes from DataObject with type
+ * string
*/
public void testStringGetTypeConversionBytes() {
DataObject product = createStringObject("0A64");
@@ -1716,8 +1655,8 @@
}
/**
- * DataObject class test.
- * Testing getting decimal from DataObject with type string
+ * DataObject class test. Testing getting decimal from DataObject with type
+ * string
*/
public void testStringGetTypeConversionBigDecimal() {
DataObject product = createStringObject("5");
@@ -1728,16 +1667,15 @@
try {
product2.getBigDecimal("stringVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigInteger from DataObject with type string
+ * DataObject class test. Testing getting BigInteger from DataObject with
+ * type string
*/
public void testStringGetTypeConversionBigInteger() {
DataObject product = createStringObject("5");
@@ -1748,16 +1686,15 @@
try {
product2.getBigInteger("stringVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting date from DataObject with type string
+ * DataObject class test. Testing getting date from DataObject with type
+ * string
*/
public void testStringGetTypeConversionDate() {
Date bdTemp = new Date();
@@ -1771,17 +1708,16 @@
try {
product2.getDate("stringVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * Helper function for byte[] converions tests.
- * Created a DataObject with 'bytesVal' byte[] property
- *
+ * Helper function for byte[] converions tests. Created a DataObject with
+ * 'bytesVal' byte[] property
+ *
* @param initialVal the initial value of the data hold property.
* @return the initialized DataObject.
*/
@@ -1792,8 +1728,8 @@
}
/**
- * DataObject class test.
- * Testing getting boolean from DataObject with type byte[]
+ * DataObject class test. Testing getting boolean from DataObject with type
+ * byte[]
*/
public void testBytesGetTypeConversionBoolean() {
byte[] byteVal = {10, 100};
@@ -1801,16 +1737,15 @@
try {
product.getBoolean("bytesVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting byte from DataObject with type byte[]
+ * DataObject class test. Testing getting byte from DataObject with type
+ * byte[]
*/
public void testBytesGetTypeConversionByte() {
byte[] byteVal = {10, 100};
@@ -1818,16 +1753,15 @@
try {
product.getByte("bytesVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting char from DataObject with type byte[]
+ * DataObject class test. Testing getting char from DataObject with type
+ * byte[]
*/
public void testBytesGetTypeConversionChar() {
byte[] byteVal = {10, 100};
@@ -1835,16 +1769,15 @@
try {
product.getChar("bytesVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting double from DataObject with type byte[]
+ * DataObject class test. Testing getting double from DataObject with type
+ * byte[]
*/
public void testBytesGetTypeConversionDouble() {
byte[] byteVal = {10, 100};
@@ -1852,16 +1785,15 @@
try {
product.getDouble("bytesVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting float from DataObject with type byte[]
+ * DataObject class test. Testing getting float from DataObject with type
+ * byte[]
*/
public void testBytesGetTypeConversionFloat() {
byte[] byteVal = {10, 100};
@@ -1869,16 +1801,15 @@
try {
product.getFloat("bytesVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting int from DataObject with type byte[]
+ * DataObject class test. Testing getting int from DataObject with type
+ * byte[]
*/
public void testBytesGetTypeConversionInt() {
byte[] byteVal = {10, 100};
@@ -1886,16 +1817,15 @@
try {
product.getInt("bytesVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting long from DataObject with type byte[]
+ * DataObject class test. Testing getting long from DataObject with type
+ * byte[]
*/
public void testBytesGetTypeConversionLong() {
byte[] byteVal = {10, 100};
@@ -1903,16 +1833,15 @@
try {
product.getLong("bytesVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting short from DataObject with type byte[]
+ * DataObject class test. Testing getting short from DataObject with type
+ * byte[]
*/
public void testBytesGetTypeConversionShort() {
byte[] byteVal = {10, 100};
@@ -1920,16 +1849,15 @@
try {
product.getShort("bytesVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting string from DataObject with type byte[]
+ * DataObject class test. Testing getting string from DataObject with type
+ * byte[]
*/
public void testBytesGetTypeConversionString() {
byte[] byteVal = {10, 100};
@@ -1939,8 +1867,8 @@
}
/**
- * DataObject class test.
- * Testing getting BigDecimal from DataObject with type byte[]
+ * DataObject class test. Testing getting BigDecimal from DataObject with
+ * type byte[]
*/
public void testBytesGetTypeConversionBigDecimal() {
byte[] byteVal = {10, 100};
@@ -1948,16 +1876,15 @@
try {
product.getBigDecimal("bytesVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigInteger from DataObject with type byte[]
+ * DataObject class test. Testing getting BigInteger from DataObject with
+ * type byte[]
*/
public void testBytesGetTypeConversionBigInteger() {
byte[] byteVal = {10, 100};
@@ -1968,12 +1895,12 @@
assertEquals(2, bytesRes.length);
assertEquals(10, bytesRes[0]);
assertEquals(100, bytesRes[1]);
- //System.out.println("testBytesGetTypeConversionBigInteger="+);
+ // System.out.println("testBytesGetTypeConversionBigInteger="+);
}
/**
- * DataObject class test.
- * Testing getting date from DataObject with type byte[]
+ * DataObject class test. Testing getting date from DataObject with type
+ * byte[]
*/
public void testBytesGetTypeConversionDate() {
byte[] byteVal = {10, 100};
@@ -1981,17 +1908,16 @@
try {
product.getDate("bytesVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * Helper function for Decimal converions tests.
- * creates a DataObject with 'bigDecimalVal' BigDecimal property
- *
+ * Helper function for Decimal converions tests. creates a DataObject with
+ * 'bigDecimalVal' BigDecimal property
+ *
* @param initialVal the initial value of the data hold property.
* @return the initialized DataObject.
*/
@@ -2002,56 +1928,53 @@
}
/**
- * DataObject class test.
- * Testing getting boolean from DataObject with type BigDecimal
+ * DataObject class test. Testing getting boolean from DataObject with type
+ * BigDecimal
*/
public void testBigDecimalGetTypeConversionBoolean() {
DataObject product = createBigDecimalObject(new BigDecimal(4));
try {
product.getBoolean("bigDecimalVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting byte from DataObject with type BigDecimal
+ * DataObject class test. Testing getting byte from DataObject with type
+ * BigDecimal
*/
public void testBigDecimalGetTypeConversionByte() {
DataObject product = createBigDecimalObject(new BigDecimal(4));
try {
product.getByte("bigDecimalVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting char from DataObject with type BigDecimal
+ * DataObject class test. Testing getting char from DataObject with type
+ * BigDecimal
*/
public void testBigDecimalGetTypeConversionChar() {
DataObject product = createBigDecimalObject(new BigDecimal(4));
try {
product.getChar("bigDecimalVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting double from DataObject with type BigDecimal
+ * DataObject class test. Testing getting double from DataObject with type
+ * BigDecimal
*/
public void testBigDecimalGetTypeConversionDouble() {
DataObject product = createBigDecimalObject(new BigDecimal(4));
@@ -2060,8 +1983,8 @@
}
/**
- * DataObject class test.
- * Testing getting float from DataObject with type BigDecimal
+ * DataObject class test. Testing getting float from DataObject with type
+ * BigDecimal
*/
public void testBigDecimalGetTypeConversionFloat() {
DataObject product = createBigDecimalObject(new BigDecimal(4));
@@ -2070,8 +1993,8 @@
}
/**
- * DataObject class test.
- * Testing getting int from DataObject with type BigDecimal
+ * DataObject class test. Testing getting int from DataObject with type
+ * BigDecimal
*/
public void testBigDecimalGetTypeConversionInt() {
DataObject product1 = createBigDecimalObject(new BigDecimal(4));
@@ -2081,12 +2004,12 @@
BigDecimal value = new BigDecimal(4.4);
DataObject product = createBigDecimalObject(value);
int i = product.getInt("bigDecimalVal");
- assertEquals( value.intValue(), i );
+ assertEquals(value.intValue(), i);
}
/**
- * DataObject class test.
- * Testing getting long from DataObject with type BigDecimal
+ * DataObject class test. Testing getting long from DataObject with type
+ * BigDecimal
*/
public void testBigDecimalGetTypeConversionLong() {
DataObject product1 = createBigDecimalObject(new BigDecimal(4));
@@ -2096,28 +2019,27 @@
BigDecimal value = new BigDecimal(4.4);
DataObject product = createBigDecimalObject(value);
long l = product.getLong("bigDecimalVal");
- assertEquals( value.longValue(), l );
+ assertEquals(value.longValue(), l);
}
/**
- * DataObject class test.
- * Testing getting short from DataObject with type BigDecimal
+ * DataObject class test. Testing getting short from DataObject with type
+ * BigDecimal
*/
public void testBigDecimalGetTypeConversionShort() {
DataObject product = createBigDecimalObject(new BigDecimal(4));
try {
product.getShort("bigDecimalVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting string from DataObject with type BigDecimal
+ * DataObject class test. Testing getting string from DataObject with type
+ * BigDecimal
*/
public void testBigDecimalGetTypeConversionString() {
BigDecimal initialVal = new BigDecimal(4);
@@ -2128,24 +2050,23 @@
}
/**
- * DataObject class test.
- * Testing getting byte[] from DataObject with type BigDecimal
+ * DataObject class test. Testing getting byte[] from DataObject with type
+ * BigDecimal
*/
public void testBigDecimalGetTypeConversionBytes() {
DataObject product = createBigDecimalObject(new BigDecimal(4));
try {
product.getBytes("bigDecimalVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting BigInteger from DataObject with type BigDecimal
+ * DataObject class test. Testing getting BigInteger from DataObject with
+ * type BigDecimal
*/
public void testBigDecimalGetTypeConversionBigInteger() {
DataObject product1 = createBigDecimalObject(new BigDecimal(4));
@@ -2155,29 +2076,28 @@
BigDecimal value = new BigDecimal(4.4);
DataObject product = createBigDecimalObject(value);
BigInteger big = product.getBigInteger("bigDecimalVal");
- assertEquals( value.toBigInteger(), big );
+ assertEquals(value.toBigInteger(), big);
}
/**
- * DataObject class test.
- * Testing getting date from DataObject with type BigDecimal
+ * DataObject class test. Testing getting date from DataObject with type
+ * BigDecimal
*/
public void testBigDecimalGetTypeConversionDate() {
DataObject product = createBigDecimalObject(new BigDecimal(4));
try {
product.getDate("bigDecimalVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * Helper function for BigInteger converions tests.
- * Creates a DataObject with 'bigIntegerVal' BigInteger property.
- *
+ * Helper function for BigInteger converions tests. Creates a DataObject
+ * with 'bigIntegerVal' BigInteger property.
+ *
* @param initialVal the initial value of the data hold property.
* @return the initialized DataObject.
*/
@@ -2188,56 +2108,53 @@
}
/**
- * DataObject class test.
- * Testing getting boolean from DataObject with type BigInteger
+ * DataObject class test. Testing getting boolean from DataObject with type
+ * BigInteger
*/
public void testBigIntegerGetTypeConversionBoolean() {
DataObject product = createBigIntegerObject(BigInteger.valueOf(4));
try {
product.getBoolean("bigIntegerVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting byte from DataObject with type BigInteger
+ * DataObject class test. Testing getting byte from DataObject with type
+ * BigInteger
*/
public void testBigIntegerGetTypeConversionByte() {
DataObject product = createBigIntegerObject(BigInteger.valueOf(4));
try {
product.getByte("bigIntegerVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting char from DataObject with type BigInteger
+ * DataObject class test. Testing getting char from DataObject with type
+ * BigInteger
*/
public void testBigIntegerGetTypeConversionChar() {
DataObject product = createBigIntegerObject(BigInteger.valueOf(4));
try {
product.getChar("bigIntegerVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting double from DataObject with type BigInteger
+ * DataObject class test. Testing getting double from DataObject with type
+ * BigInteger
*/
public void testBigIntegerGetTypeConversionDouble() {
DataObject product = createBigIntegerObject(BigInteger.valueOf(4));
@@ -2246,8 +2163,8 @@
}
/**
- * DataObject class test.
- * Testing getting float from DataObject with type BigInteger
+ * DataObject class test. Testing getting float from DataObject with type
+ * BigInteger
*/
public void testBigIntegerGetTypeConversionFloat() {
DataObject product = createBigIntegerObject(BigInteger.valueOf(4));
@@ -2257,8 +2174,8 @@
}
/**
- * DataObject class test.
- * Testing getting int from DataObject with type BigInteger
+ * DataObject class test. Testing getting int from DataObject with type
+ * BigInteger
*/
public void testBigIntegerGetTypeConversionInt() {
DataObject product = createBigIntegerObject(BigInteger.valueOf(4));
@@ -2269,12 +2186,12 @@
BigInteger value = BigInteger.valueOf(Long.MAX_VALUE);
DataObject product1 = createBigIntegerObject(value);
int i = product1.getInt("bigIntegerVal");
- assertEquals( value.intValue(), i );
+ assertEquals(value.intValue(), i);
}
/**
- * DataObject class test.
- * Testing getting long from DataObject with type BigInteger
+ * DataObject class test. Testing getting long from DataObject with type
+ * BigInteger
*/
public void testBigIntegerGetTypeConversionLong() {
DataObject product = createBigIntegerObject(BigInteger.valueOf(4));
@@ -2284,24 +2201,23 @@
}
/**
- * DataObject class test.
- * Testing getting short from DataObject with type BigInteger
+ * DataObject class test. Testing getting short from DataObject with type
+ * BigInteger
*/
public void testBigIntegerGetTypeConversionShort() {
DataObject product = createBigIntegerObject(BigInteger.valueOf(4));
try {
product.getShort("bigIntegerVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting string from DataObject with type BigInteger
+ * DataObject class test. Testing getting string from DataObject with type
+ * BigInteger
*/
public void testBigIntegerGetTypeConversionString() {
DataObject product = createBigIntegerObject(BigInteger.valueOf(4));
@@ -2312,8 +2228,8 @@
}
/**
- * DataObject class test.
- * Testing getting byte[] from DataObject with type BigInteger
+ * DataObject class test. Testing getting byte[] from DataObject with type
+ * BigInteger
*/
public void testBigIntegerGetTypeConversionBytes() {
byte[] byteVal = {10, 100};
@@ -2328,8 +2244,8 @@
}
/**
- * DataObject class test.
- * Testing getting BigDecimal from DataObject with type BigInteger
+ * DataObject class test. Testing getting BigDecimal from DataObject with
+ * type BigInteger
*/
public void testBigIntegerGetTypeConversionBigDecimal() {
DataObject product = createBigIntegerObject(BigInteger.valueOf(4));
@@ -2339,25 +2255,24 @@
}
/**
- * DataObject class test.
- * Testing getting date from DataObject with type BigInteger
+ * DataObject class test. Testing getting date from DataObject with type
+ * BigInteger
*/
public void testBigIntegerGetTypeConversionDate() {
DataObject product = createBigIntegerObject(BigInteger.valueOf(4));
try {
product.getDate("bigIntegerVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * Helper function for Date converions tests.
- * Creates a DataObject with 'dateVal' date property.
- *
+ * Helper function for Date converions tests. Creates a DataObject with
+ * 'dateVal' date property.
+ *
* @param initialVal the initial value of the data hold property.
* @return the initialized DataObject.
*/
@@ -2367,106 +2282,98 @@
return productType;
}
-
/**
- * DataObject class test.
- * Testing getting boolean from DataObject with type date
+ * DataObject class test. Testing getting boolean from DataObject with type
+ * date
*/
public void testDateGetTypeConversionBoolean() {
DataObject product = createDateObject(new Date());
try {
product.getBoolean("dateVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting byte from DataObject with type date
+ * DataObject class test. Testing getting byte from DataObject with type
+ * date
*/
public void testDateGetTypeConversionByte() {
DataObject product = createDateObject(new Date());
try {
product.getByte("dateVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting char from DataObject with type date
+ * DataObject class test. Testing getting char from DataObject with type
+ * date
*/
public void testDateGetTypeConversionChar() {
DataObject product = createDateObject(new Date());
try {
product.getChar("dateVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting double from DataObject with type date
+ * DataObject class test. Testing getting double from DataObject with type
+ * date
*/
public void testDateGetTypeConversionDouble() {
DataObject product = createDateObject(new Date());
try {
product.getDouble("dateVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
- * DataObject class test.
- * Testing getting float from DataObject with type date
+ * DataObject class test. Testing getting float from DataObject with type
+ * date
*/
public void testDateGetTypeConversionFloat() {
DataObject product = createDateObject(new Date());
try {
product.getFloat("dateVal");
fail(EXPECTED_CLASS_CAST_EXCEPTION);
- }
- catch (ClassCastException e) {
- //expected
+ } catch (ClassCastException e) {
+ // expected
}
}
/**
[... 2734 lines stripped ...]
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org