1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-06 13:11:08 +01:00

Added avatar test.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@3829 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Alex Wenckus 2006-05-03 21:23:18 +00:00 committed by alex
parent c22f731c6d
commit 6f832ddb99
2 changed files with 101 additions and 0 deletions

View file

@ -349,4 +349,20 @@ public abstract class SmackTestCase extends TestCase {
return "config/" + fullClassName.substring(firstChar) + ".xml";
}
/**
* Compares two contents of two byte arrays to make sure that they are equal
*
* @param message The message to show in the case of failure
* @param byteArray1 The first byte array.
* @param byteArray2 The second byte array.
*/
public static void assertEquals(String message, byte [] byteArray1, byte [] byteArray2) {
if(byteArray1.length != byteArray2.length) {
fail(message);
}
for(int i = 0; i < byteArray1.length; i++) {
assertEquals(message, byteArray1[i], byteArray2[i]);
}
}
}