|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.ambient.commons.TestUtils
public final class TestUtils
Test utilities.
| Method Summary | ||
|---|---|---|
static
|
compareLists(java.util.Collection<? extends T> expected,
java.util.Collection<? extends T> got)
Compares given collection as lists, item by item. |
|
static
|
compareSets(java.util.Collection<? extends T> expected,
java.util.Collection<? extends T> got)
Compares given collection as sets. |
|
static java.io.InputStream |
stringToInputStream(java.lang.String str,
java.lang.String encoding)
Converts given string to a byte array and returns an input stream. |
|
static byte[] |
toAscii(java.lang.String str)
Converts given string char-by-char to a byte array. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static byte[] toAscii(java.lang.String str)
str - the string to convert.
public static java.io.InputStream stringToInputStream(java.lang.String str,
java.lang.String encoding)
throws java.io.UnsupportedEncodingException
str - the string to convert.encoding - the encoding
java.io.UnsupportedEncodingException
public static <T> void compareLists(java.util.Collection<? extends T> expected,
java.util.Collection<? extends T> got)
T - the item typeexpected - expected listgot - actual list.
public static <T> void compareSets(java.util.Collection<? extends T> expected,
java.util.Collection<? extends T> got)
T - the item typeexpected - expected listgot - actual list.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||