| java.lang.Object org.kuali.kfs.context.TestUtils
TestUtils | public class TestUtils (Code) | | This class provides utility methods for use during manual testing.
|
Inner Class :public interface ItemFormatter | |
Inner Class :public interface EntryFormatter | |
convertInputStreamToString | public static String convertInputStreamToString(InputStream inputStream) throws IOException(Code) | | Converts an InputStream to a String using UTF-8 encoding.
Parameters: inputStream - - InputStream to convert. String - converted from InputStream throws: IOException - |
convertStringToInputStream | public static InputStream convertStringToInputStream(String string) throws IOException(Code) | | Converts a String to an InputStream using UTF-8 encoding.
Parameters: string - - string to convert InputStream - converted from the given string throws: IOException - |
disableScheduledTasks | public static void disableScheduledTasks()(Code) | | Disables all scheduled tasks, to make debugging easier.
|
dumpCollection | public static void dumpCollection(Collection collection)(Code) | | Iterates through the given Collection, printing toString of each item in the collection to stderr
Parameters: collection - |
dumpCollection | public static void dumpCollection(Collection collection, ItemFormatter formatter)(Code) | | Iterates through the given Collection, printing f.format() of each item in the collection to stderr
Parameters: collection - Parameters: formatter - ItemFormatter used to format each item for printing |
dumpMap | public static void dumpMap(Map map)(Code) | | Iterates through the entries of the given Map, printing toString of each (key,value) to stderr
Parameters: map - |
dumpMap | public static void dumpMap(Map map, EntryFormatter formatter)(Code) | | Iterates through the entries of the given Map, printing formatter.format() of each Map.Entry to stderr
Parameters: map - Parameters: formatter - |
dumpTree | public static void dumpTree(PropertyTree tree)(Code) | | Recursively prints the contents of the given PropertyTree to stderr
Parameters: tree - |
formatCollection | public static String formatCollection(Collection collection, ItemFormatter formatter)(Code) | | Suitable for attaching as a detailFormatter in Eclipse
Parameters: collection - Parameters: formatter - String composed of contents of the given Collection, one per line, formatted by the given ItemFormatter |
formatMap | public static String formatMap(Map map, EntryFormatter formatter)(Code) | | Suitable for attaching as a detailFormatter in Eclipse
Parameters: m - String composed of contents of the given Map, one entry per line, formatted by the given EntryFormatter |
formatTree | public static String formatTree(PropertyTree tree)(Code) | | Suitable for attaching as a detailFormatter in Eclipse
Parameters: tree - String composed of the contents of the given PropertyTree, one entry per line |
getInputStreamSize | public static int getInputStreamSize(InputStream inputStream) throws IOException(Code) | | Returns the size of an InputStream by first converting it to an ByteArrayOutputStream and getting the size of it.
|
main | public static void main(String args)(Code) | | Given a list of classnames of TestCase subclasses, assembles a TestSuite containing all tests within those classes, then runs
those tests and logs the results.
Created this method so that I could use OptimizeIt, which was asking for a main() method to run.
Parameters: args - |
setSystemParameter | public static void setSystemParameter(Class componentClass, String parameterName, String parameterText) throws Exception(Code) | | This sets a given system parameter and clears the method cache for retrieving the parameter.
|
|
|