Commit Graph

24 Commits

Author SHA1 Message Date
Paul Schaub f3740fe53d
Fix checkstyle issues in PubSubIntegrationTest 2020-10-24 19:52:33 +02:00
Guus der Kinderen 04e5f78411 Remove unneeded empty string from stanza.toXML() invocation. 2020-10-24 19:36:02 +02:00
Guus der Kinderen 76dedf364b Switch to use FillableSubscribeForm 2020-10-24 19:36:02 +02:00
Guus der Kinderen b43a7b1987 Additional Pubsub integration tests
For XEP-0060 § 7.1.2. Asserts that publishing an item with the same ID overwrites the previous item with that ID.
2020-10-24 19:36:02 +02:00
Guus der Kinderen 8e2e555c4f Additional Pubsub integration tests
For XEP-0060 § 8.4.1: Assert that the server send a notification to subscribers when deleting a node that exists.
2020-10-24 19:36:02 +02:00
Guus der Kinderen 8bec182d2a Additional Pubsub integration tests
Test for XEP-0060 § 8.4.3.2: Asserts that the server returns an 'item-not-found' error response when deleting a node that does not exist.
2020-10-24 19:36:02 +02:00
Guus der Kinderen f4d24cf2cf Additional Pubsub integration tests
Tests for non-optional ('MUST') conditions in XEP-0060 § 6.2
2020-10-24 19:36:02 +02:00
Guus der Kinderen 7d492e1c66 Additional Pubsub integration tests
Tests for non-optional ('MUST') conditions in XEP-0060 § 6.1.6
2020-10-24 19:36:02 +02:00
Guus der Kinderen 28993629b8 Additional Pubsub integration tests
Tests for non-optional ('MUST') conditions in XEP-0060 § 6.1.4
2020-10-24 19:36:02 +02:00
Guus der Kinderen 33252eea20 Additional Pubsub integration tests
Tests for
non-optional ('MUST')
error conditions upon subscription
(XEP-0060 § 6.1.3).
2020-10-24 19:36:02 +02:00
Guus der Kinderen 3c1b76cfe3 Additional Pubsub integration tests
Adds
tests
to
the
Smack
integrationtest
framework
for
basic
Pubsub
functionality.
2020-10-24 19:36:02 +02:00
Florian Schmaus 77e26fc575 Re-work data form API
Apply builder pattern to form fields and replace getVariable() with
getFieldName(). Refer to the field name as "field name" instead of
"variable" everyone, just as XEP-0004 does.

Improve the high-level form API: introduce FilledForm and FillableForm
which perform stronger validation and consistency checks.

Also add FormFieldRegistry to enable processing of 'submit' forms
where the form field types are omitted.

Smack also now does omit the form field type declaration on 'submit'
type forms, as it is allowed by XEP-0004.
2020-05-13 20:14:41 +02:00
Florian Schmaus e8fef260e6 sinttest: migrate to JUnit5, drop JUnit4
The before/after class annotations are now no longer borrowed from
JUnit.

Also some integration tests used @After and/or @Before from JUnit,
which was never supported nor had any effected. Those methods got
deleted. But since there appears to be a desire for such a
functionality in sinttest, we should consider adding one.
2020-04-12 22:21:30 +02:00
Florian Schmaus cc636fff21 Introduce Smack's Modular Connection Architecture
This is a complete redesign of what was previously
XmppNioTcpConnection. The new architecture allows to extend an XMPP
client to server (c2s) connection with new transport bindings and
other extensions.
2020-04-04 13:03:31 +02:00
Florian Schmaus 1a3067c89b Enable werror for javadoc and fix javadoc issues 2019-08-30 12:08:30 +02:00
Florian Schmaus aec648c34b Improve PubSubIntegrationTest
Ensuring that the node has no items in
transientNotificationOnlyNodeWithoutItemTest() is not right. An
implementation is free to create an item with an ID and return it. The
item is just not guaranteed to be persistent.

Also add a dummy payload to
transientNotificationOnlyNodeWithItemTest().
2019-07-04 16:48:35 +02:00
Guus der Kinderen fc70484cf6 More specific Pubsub integration tests.
XEP-0060 prohibits publishing a request that contains an item to a node that
is both 'notification-only' and 'transient' (section 7.1.3.6)

In commit 8ed872ca63 the existing pubsub publication
test was modified (to resolve a different issue) to operate on a node that's both
'notification-only' and 'transient'. This resulted in a test that should return
an error, even though the test implementation didn't expect one.

This commit explicitly verifies that publishing an item to such a node causes
an error to be returned. A new test is added that verifies that publishing an
event notification does succeed.
2019-04-17 21:52:01 +02:00
Florian Schmaus d97fb126a1 Add PubSubManager.getInstanceFor() just like all other Managers
and deprecate PubSubManager.getInstance().
2019-04-16 11:21:22 +02:00
Florian Schmaus 8ed872ca63 PubSubIntegrationTest: Add workaround for ejabberd issue #2799 2019-02-17 17:51:37 +01:00
Florian Schmaus e98d42790a SmackReactor/NIO, Java8/Android19, Pretty print XML, FSM connections
This commit adds
- SmackReactor / NIO
- a framework for finite state machine connections
- support for Java 8
- pretty printed XML debug output

It also
- reworks the integration test framework
- raises the minimum Android API level to 19
- introduces XmppNioTcpConnection

Furthermore fixes SMACK-801 (at least partly). Java 8 language
features are available, but not all runtime library methods. For that
we would need to raise the Android API level to 24 or higher.
2019-02-05 13:18:03 +01:00
Florian Schmaus 1bd3469fec Also set persist items to true in PubSubIntegrationTest 2018-02-22 15:05:12 +01:00
Florian Schmaus 79cb639f93 Improve PubSubIntegrationTest.simplePubSubNodeTest()
by setting the node's deliverPayloads to 'false'.
2018-02-21 20:09:11 +01:00
Florian Schmaus 08e897113d Add CustomImportOrder checkstyle rule
And matching ImportOrder settings for Eclipse in
resources/eclipse/smack.importorder
2017-06-14 17:12:43 +02:00
Florian Schmaus 001e824fb9 Improve PubSub API
Use Manager pattern for PubSubManager.

Also improve the API of ServiceDiscoverManager.
2015-05-12 17:56:06 +02:00