Methods Summary |
---|
public static void | addClientHandler(java.lang.String s)
clientHandlers.add(s);
|
public static void | addServerHandler(java.lang.String s)
serverHandlers.add(s);
|
public static void | assertClientHandlerOrder(java.lang.String[] arr)
assertHandlerOrder(clientHandlers, arr);
|
public static void | assertHandlerOrder(java.util.List handlers, java.lang.String[] expected)
String[] actual = new String[handlers.size()];
handlers.toArray(actual);
System.out.print("excepted order:");
for (int i = 0; i < expected.length; i++) {
System.out.print(expected[i] + " ");
}
System.out.println("\n");
System.out.print("actual order:");
for (int i = 0; i < actual.length; i++) {
System.out.print(actual[i] + " ");
}
System.out.println("\n");
if (expected.length != actual.length) {
throw new Exception("Handler length not match");
}
System.out.println("\n");
for (int i = 0; i < expected.length; i++) {
if (!expected[i].equals(actual[i])) {
throw new Exception("Handler order not match : expected = " + expected[i] + ", actual = " + actual[i]);
}
}
return;
|
public static void | assertServerHandlerOrder(java.lang.String[] arr)
assertHandlerOrder(serverHandlers, arr);
|
public static void | init()
clientHandlers = new ArrayList();
serverHandlers = new ArrayList();
|