Package org.apache.ofbiz.base.test
Class GenericTestCaseBase
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.ofbiz.base.test.GenericTestCaseBase
-
- All Implemented Interfaces:
junit.framework.Test
- Direct Known Subclasses:
ComparableRangeTests
,DateTimeTests
,FlexibleMapAccessorTests
,GenericMapTest
,IndentingWriterTests
,MiscTests
,ObjectTypeTests
,ReferenceCleanerTests
,StringUtilTests
,TimeDurationTests
,UtilCacheTests
,UtilHttpTests
,UtilIOTests
,UtilMiscTests
,UtilObjectTests
,UtilPropertiesTests
public abstract class GenericTestCaseBase extends junit.framework.TestCase
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GenericTestCaseBase(java.lang.String name)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assertComparison(java.lang.String label, int wanted, int result)
static void
assertEquals(java.lang.Object wanted, java.lang.Object got)
static void
assertEquals(java.lang.String msg, java.lang.Object wanted, java.lang.Object got)
static void
assertEquals(java.lang.String msg, java.lang.String wanted, java.lang.String got)
static <T> void
assertEquals(java.lang.String msg, java.util.Collection<T> wanted, java.lang.Object got)
static <T> void
assertEquals(java.lang.String msg, java.util.List<T> wanted, java.lang.Object got)
static <T> void
assertEquals(java.lang.String msg, java.util.Map<T,?> wanted, java.lang.Object got)
static <T> void
assertEquals(java.lang.String msg, java.util.Set<T> wanted, java.lang.Object got)
static <T> void
assertEquals(java.util.Collection<T> wanted, java.lang.Object got)
static <T> void
assertEquals(java.util.List<T> wanted, java.lang.Object got)
static <T> void
assertEquals(java.util.Map<T,?> wanted, java.lang.Object got)
static <T> void
assertEquals(java.util.Set<T> wanted, java.lang.Object got)
static <V,I extends java.lang.Iterable<V>>
voidassertEqualsIterable(java.lang.String label, java.util.List<? extends V> wanted, int wantedExtra, I got, int gotExtra)
static <V,I extends java.lang.Iterable<V>>
voidassertEqualsIterable(java.lang.String label, java.util.List<? extends V> wanted, I got)
static <V,I extends java.lang.Iterable<V>>
voidassertEqualsIterable(java.lang.String label, java.util.List<? extends V> wanted, java.util.List<? extends V> wantedExtra, boolean removeWanted, I got, java.util.List<? extends V> gotExtra, boolean removeGot)
static <V,I extends java.lang.Iterable<V>>
voidassertEqualsIterable(java.lang.String label, java.util.List<? extends V> wanted, java.util.List<? extends V> wantedExtra, I got, java.util.List<? extends V> gotExtra)
static <V,E extends java.lang.Exception>
voidassertFuture(java.lang.String label, java.util.concurrent.Future<V> future, V wanted, boolean interruptable, java.lang.Class<E> thrownClass, java.lang.String thrownMessage)
static <T> void
assertNotEquals(java.lang.Object wanted, java.lang.Object got)
static <T> void
assertNotEquals(java.lang.String msg, java.lang.Object wanted, java.lang.Object got)
static void
assertStaticHelperClass(java.lang.Class<?> clz)
static <T> java.util.List<T>
list(T value)
static <T> java.util.List<T>
list(T... list)
static <K,V>
java.util.Map<K,V>map(java.lang.Object... list)
static <T> java.util.Set<T>
set(java.lang.Iterable<T> iterable)
static <T> java.util.Set<T>
set(java.util.Iterator<T> it)
static <T> java.util.Set<T>
set(T value)
static <T> java.util.Set<T>
set(T... list)
static void
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
-
useAllMemory
public static void useAllMemory() throws java.lang.Exception
- Throws:
java.lang.Exception
-
assertStaticHelperClass
public static void assertStaticHelperClass(java.lang.Class<?> clz) throws java.lang.Exception
- Throws:
java.lang.Exception
-
assertComparison
public static void assertComparison(java.lang.String label, int wanted, int result)
-
assertFuture
public static <V,E extends java.lang.Exception> void assertFuture(java.lang.String label, java.util.concurrent.Future<V> future, V wanted, boolean interruptable, java.lang.Class<E> thrownClass, java.lang.String thrownMessage)
-
assertNotEquals
public static <T> void assertNotEquals(java.lang.Object wanted, java.lang.Object got)
-
assertNotEquals
public static <T> void assertNotEquals(java.lang.String msg, java.lang.Object wanted, java.lang.Object got)
-
assertEquals
public static <T> void assertEquals(java.util.List<T> wanted, java.lang.Object got)
-
assertEquals
public static <T> void assertEquals(java.lang.String msg, java.util.List<T> wanted, java.lang.Object got)
-
assertEquals
public static <T> void assertEquals(java.util.Collection<T> wanted, java.lang.Object got)
-
assertEquals
public static <T> void assertEquals(java.lang.String msg, java.util.Collection<T> wanted, java.lang.Object got)
-
assertEquals
public static <T> void assertEquals(java.util.Set<T> wanted, java.lang.Object got)
-
assertEquals
public static <T> void assertEquals(java.lang.String msg, java.util.Set<T> wanted, java.lang.Object got)
-
assertEqualsIterable
public static <V,I extends java.lang.Iterable<V>> void assertEqualsIterable(java.lang.String label, java.util.List<? extends V> wanted, I got)
-
assertEqualsIterable
public static <V,I extends java.lang.Iterable<V>> void assertEqualsIterable(java.lang.String label, java.util.List<? extends V> wanted, int wantedExtra, I got, int gotExtra)
-
assertEqualsIterable
public static <V,I extends java.lang.Iterable<V>> void assertEqualsIterable(java.lang.String label, java.util.List<? extends V> wanted, java.util.List<? extends V> wantedExtra, I got, java.util.List<? extends V> gotExtra)
-
assertEqualsIterable
public static <V,I extends java.lang.Iterable<V>> void assertEqualsIterable(java.lang.String label, java.util.List<? extends V> wanted, java.util.List<? extends V> wantedExtra, boolean removeWanted, I got, java.util.List<? extends V> gotExtra, boolean removeGot)
-
assertEquals
public static <T> void assertEquals(java.util.Map<T,?> wanted, java.lang.Object got)
-
assertEquals
public static <T> void assertEquals(java.lang.String msg, java.util.Map<T,?> wanted, java.lang.Object got)
-
assertEquals
public static void assertEquals(java.lang.String msg, java.lang.String wanted, java.lang.String got)
-
assertEquals
public static void assertEquals(java.lang.Object wanted, java.lang.Object got)
-
assertEquals
public static void assertEquals(java.lang.String msg, java.lang.Object wanted, java.lang.Object got)
-
list
public static <T> java.util.List<T> list(T value)
-
list
@SafeVarargs public static <T> java.util.List<T> list(T... list)
-
set
public static <T> java.util.Set<T> set(T value)
-
set
@SafeVarargs public static <T> java.util.Set<T> set(T... list)
-
set
public static <T> java.util.Set<T> set(java.lang.Iterable<T> iterable)
-
set
public static <T> java.util.Set<T> set(java.util.Iterator<T> it)
-
map
public static <K,V> java.util.Map<K,V> map(java.lang.Object... list)
-
-