Package org.apache.ofbiz.base.util.test
Class ObjectTypeTests
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.ofbiz.base.test.GenericTestCaseBase
-
- org.apache.ofbiz.base.util.test.ObjectTypeTests
-
- All Implemented Interfaces:
junit.framework.Test
public class ObjectTypeTests extends GenericTestCaseBase
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ObjectTypeTests.LocaleData
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Constructor Summary
Constructors Constructor Description ObjectTypeTests(java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
basicTest(java.lang.String label, java.lang.Object toConvert)
static java.lang.Object
simpleTypeConvert(java.lang.Object obj, java.lang.String type, java.lang.String format, java.util.TimeZone timeZone, java.util.Locale locale, boolean noTypeFail)
static void
simpleTypeConvertTest(java.lang.String label, java.lang.Object toConvert, java.lang.String type, java.lang.Object wanted)
static void
simpleTypeConvertTest(java.lang.String label, java.lang.Object toConvert, java.lang.String type, java.lang.String format, ObjectTypeTests.LocaleData localeData, java.lang.Object wanted)
static void
simpleTypeConvertTestError(java.lang.String label, java.lang.Object toConvert, java.lang.String type)
static void
simpleTypeConvertTestError(java.lang.String label, java.lang.Object toConvert, java.lang.String[] types)
static void
simpleTypeConvertTestMultiMulti(java.lang.String label, java.lang.Object[] toConvert, java.lang.String[] types, java.lang.Object wanted)
static void
simpleTypeConvertTestMultiMulti(java.lang.String label, java.lang.Object[] toConvert, java.lang.String[] types, java.lang.String format, ObjectTypeTests.LocaleData localeData, java.lang.Object wanted)
static void
simpleTypeConvertTestNoError(java.lang.String label, java.lang.Object toConvert, java.lang.String type)
static void
simpleTypeConvertTestNoError(java.lang.String label, java.lang.Object toConvert, java.lang.String[] types)
static void
simpleTypeConvertTestSingleMulti(java.lang.String label, java.lang.Object toConvert, java.lang.String[] types, java.lang.Object wanted)
static void
simpleTypeConvertTestSingleMulti(java.lang.String label, java.lang.Object toConvert, java.lang.String[] types, java.lang.String format, ObjectTypeTests.LocaleData localeData, java.lang.Object wanted)
void
testArray()
void
testBigDecimal()
void
testBoolean()
void
testClassNotFound()
void
testDouble()
void
testFloat()
void
testInteger()
void
testList()
void
testLoadClassWithAlias()
void
testLoadClassWithNonExistentClass()
void
testLoadClassWithPrimitives()
void
testLocale()
void
testLong()
void
testMap()
void
testOther()
void
testSqlDate()
void
testSqlTime()
void
testString()
void
testTimeDuration()
void
testTimestamp()
void
testTimeZone()
-
Methods inherited from class org.apache.ofbiz.base.test.GenericTestCaseBase
assertComparison, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsIterable, assertEqualsIterable, assertEqualsIterable, assertEqualsIterable, assertFuture, assertNotEquals, assertNotEquals, assertStaticHelperClass, list, list, map, set, set, set, set, useAllMemory
-
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
-
-
-
-
Method Detail
-
simpleTypeConvert
public static java.lang.Object simpleTypeConvert(java.lang.Object obj, java.lang.String type, java.lang.String format, java.util.TimeZone timeZone, java.util.Locale locale, boolean noTypeFail) throws GeneralException
- Throws:
GeneralException
-
simpleTypeConvertTest
public static void simpleTypeConvertTest(java.lang.String label, java.lang.Object toConvert, java.lang.String type, java.lang.Object wanted) throws GeneralException
- Throws:
GeneralException
-
simpleTypeConvertTest
public static void simpleTypeConvertTest(java.lang.String label, java.lang.Object toConvert, java.lang.String type, java.lang.String format, ObjectTypeTests.LocaleData localeData, java.lang.Object wanted) throws GeneralException
- Throws:
GeneralException
-
simpleTypeConvertTestSingleMulti
public static void simpleTypeConvertTestSingleMulti(java.lang.String label, java.lang.Object toConvert, java.lang.String[] types, java.lang.Object wanted) throws GeneralException
- Throws:
GeneralException
-
simpleTypeConvertTestMultiMulti
public static void simpleTypeConvertTestMultiMulti(java.lang.String label, java.lang.Object[] toConvert, java.lang.String[] types, java.lang.Object wanted) throws GeneralException
- Throws:
GeneralException
-
simpleTypeConvertTestSingleMulti
public static void simpleTypeConvertTestSingleMulti(java.lang.String label, java.lang.Object toConvert, java.lang.String[] types, java.lang.String format, ObjectTypeTests.LocaleData localeData, java.lang.Object wanted) throws GeneralException
- Throws:
GeneralException
-
simpleTypeConvertTestMultiMulti
public static void simpleTypeConvertTestMultiMulti(java.lang.String label, java.lang.Object[] toConvert, java.lang.String[] types, java.lang.String format, ObjectTypeTests.LocaleData localeData, java.lang.Object wanted) throws GeneralException
- Throws:
GeneralException
-
simpleTypeConvertTestError
public static void simpleTypeConvertTestError(java.lang.String label, java.lang.Object toConvert, java.lang.String type) throws GeneralException
- Throws:
GeneralException
-
simpleTypeConvertTestError
public static void simpleTypeConvertTestError(java.lang.String label, java.lang.Object toConvert, java.lang.String[] types) throws GeneralException
- Throws:
GeneralException
-
simpleTypeConvertTestNoError
public static void simpleTypeConvertTestNoError(java.lang.String label, java.lang.Object toConvert, java.lang.String type) throws GeneralException
- Throws:
GeneralException
-
simpleTypeConvertTestNoError
public static void simpleTypeConvertTestNoError(java.lang.String label, java.lang.Object toConvert, java.lang.String[] types) throws GeneralException
- Throws:
GeneralException
-
basicTest
public static void basicTest(java.lang.String label, java.lang.Object toConvert) throws GeneralException
- Throws:
GeneralException
-
testLoadClassWithNonExistentClass
public void testLoadClassWithNonExistentClass()
-
testLoadClassWithPrimitives
public void testLoadClassWithPrimitives()
-
testLoadClassWithAlias
public void testLoadClassWithAlias()
-
testClassNotFound
public void testClassNotFound()
-
testArray
public void testArray() throws GeneralException
- Throws:
GeneralException
-
testString
public void testString() throws GeneralException, java.lang.Exception
- Throws:
GeneralException
java.lang.Exception
-
testDouble
public void testDouble() throws GeneralException
- Throws:
GeneralException
-
testFloat
public void testFloat() throws GeneralException
- Throws:
GeneralException
-
testLong
public void testLong() throws GeneralException
- Throws:
GeneralException
-
testInteger
public void testInteger() throws GeneralException
- Throws:
GeneralException
-
testBigDecimal
public void testBigDecimal() throws GeneralException
- Throws:
GeneralException
-
testSqlDate
public void testSqlDate() throws GeneralException
- Throws:
GeneralException
-
testSqlTime
public void testSqlTime() throws GeneralException
- Throws:
GeneralException
-
testTimestamp
public void testTimestamp() throws GeneralException
- Throws:
GeneralException
-
testBoolean
public void testBoolean() throws GeneralException
- Throws:
GeneralException
-
testLocale
public void testLocale() throws GeneralException
- Throws:
GeneralException
-
testTimeZone
public void testTimeZone() throws GeneralException
- Throws:
GeneralException
-
testMap
public void testMap() throws GeneralException
- Throws:
GeneralException
-
testList
public void testList() throws GeneralException
- Throws:
GeneralException
-
testTimeDuration
public void testTimeDuration() throws GeneralException
- Throws:
GeneralException
-
testOther
public void testOther() throws GeneralException
- Throws:
GeneralException
-
-