mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-23 19:18:00 +01:00
[test] Use correct class StanzaBuilder for static call to buildMessage()
This commit is contained in:
parent
c4ad857c0d
commit
ca85b8326a
2 changed files with 6 additions and 5 deletions
|
@ -20,7 +20,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.packet.MessageBuilder;
|
||||
import org.jivesoftware.smack.packet.StanzaBuilder;
|
||||
|
||||
import org.jivesoftware.smackx.fallback_indication.element.FallbackIndicationElement;
|
||||
|
||||
|
@ -30,11 +30,11 @@ public class FallbackIndicationTest {
|
|||
|
||||
@Test
|
||||
public void testFallbackIndicationElementFromMessageTest() {
|
||||
Message messageWithoutFallback = MessageBuilder.buildMessage()
|
||||
Message messageWithoutFallback = StanzaBuilder.buildMessage()
|
||||
.build();
|
||||
assertNull(FallbackIndicationElement.fromMessage(messageWithoutFallback));
|
||||
|
||||
Message messageWithFallback = MessageBuilder.buildMessage()
|
||||
Message messageWithFallback = StanzaBuilder.buildMessage()
|
||||
.addExtension(new FallbackIndicationElement())
|
||||
.build();
|
||||
assertNotNull(FallbackIndicationElement.fromMessage(messageWithFallback));
|
||||
|
|
|
@ -29,6 +29,7 @@ import java.util.Arrays;
|
|||
|
||||
import org.jivesoftware.smack.packet.MessageBuilder;
|
||||
import org.jivesoftware.smack.packet.StandardExtensionElement;
|
||||
import org.jivesoftware.smack.packet.StanzaBuilder;
|
||||
import org.jivesoftware.smack.packet.StanzaFactory;
|
||||
import org.jivesoftware.smack.packet.id.StandardStanzaIdSource;
|
||||
import org.jivesoftware.smack.parsing.SmackParsingException;
|
||||
|
@ -166,10 +167,10 @@ public class MessageFasteningElementsTest {
|
|||
|
||||
@Test
|
||||
public void hasFasteningElementTest() {
|
||||
MessageBuilder messageBuilderWithFasteningElement = MessageBuilder.buildMessage()
|
||||
MessageBuilder messageBuilderWithFasteningElement = StanzaBuilder.buildMessage()
|
||||
.setBody("Hi!")
|
||||
.addExtension(FasteningElement.builder().setOriginId("origin-id-1").build());
|
||||
MessageBuilder messageBuilderWithoutFasteningElement = MessageBuilder.buildMessage()
|
||||
MessageBuilder messageBuilderWithoutFasteningElement = StanzaBuilder.buildMessage()
|
||||
.setBody("Ho!");
|
||||
|
||||
assertTrue(FasteningElement.hasFasteningElement(messageBuilderWithFasteningElement));
|
||||
|
|
Loading…
Reference in a new issue