I’m using asmack in my android project. In this project I’m using xep-0332 (which is experimental). So, I’ve created necessary extensions and providers. And I would like to include them into smack, in order other developers could make use of this.
Now I’m going to create unit tests. And here comes the question
According to smack documentation test classes should extend SmackTestCase. Is this mandatory if I only have extensions and providers?
P.S. I do have agreement of my employer to provide the code to smack
Great news! XEP-332 support for Smack is much appreciated.
No, it’s not mandatory to extend the SmackTestCase for unit tests. In fact DOC-1984 is a bit inaccurate there, as SmackTestCase is used for the integration tests and not the unit tests. Feel free to do whatever suits you best and is beneficial for the unit tests.
What is important is that you
Base your work on the latest Smack master (normally I would say on the master found in igniterealtimes github repo, but I just pushed a change to my repo on github that changes the exceptions API so you should use this version).
Create a new gradle subproject for the XEP-332 specific code, just like we do for standard XMPP over TCP and BOSH
Build often a aSmack version of your Smack code. We support Android API 8 or higher for aSmack, but not every Java SE API is availabe on this Android API level!
You are also welcome to join #smack in freenode and idle around there. It’s usually easier to ask a quick question regarding development in IRC, compared to posting in the forum and helps coordinating the development.