1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 09:39:39 +02:00

Fix unit-tests initialization

Remove the TestSuite class. We now have

SmackTestSuite
    ^
	|
InitExtensions
    ^
	|
$UnitTest

where most basic setup is done in a static block within
SmackTestSuite (only stringencoder setup right now).

Also some minor fixes in unit tests.
This commit is contained in:
Florian Schmaus 2015-03-24 21:38:21 +01:00
parent c6594aec2f
commit 0897b76718
24 changed files with 44 additions and 107 deletions

View file

@ -36,7 +36,7 @@ import org.jivesoftware.smack.packet.Stanza;
/**
* This class can be used in conjunction with a mocked XMPP connection (
* {@link ConnectionUtils#createMockedConnection(Protocol, String, String)}) to
* {@link ConnectionUtils#createMockedConnection(Protocol, org.jxmpp.jid.FullJid, org.jxmpp.jid.DomainBareJid)}) to
* verify an XMPP protocol. This can be accomplished in the following was:
* <ul>
* <li>add responses to packets sent over the mocked XMPP connection by the
@ -176,7 +176,7 @@ public class Protocol {
return requests;
}
private String prettyFormat(String input, int indent) {
private static String prettyFormat(String input, int indent) {
try {
Source xmlInput = new StreamSource(new StringReader(input));
StringWriter stringWriter = new StringWriter();
@ -193,7 +193,7 @@ public class Protocol {
}
}
private String prettyFormat(String input) {
private static String prettyFormat(String input) {
return prettyFormat(input, 2);
}