mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-09 18:29:45 +02:00
Create smack-im subproject for XMPP-IM
Move Roster and Chat(Manager) code into their own packages within the new smack-im subproject. Apply Manager pattern to Roster. Fixes SMACK-637.
This commit is contained in:
parent
e722018808
commit
d5b8647d9d
47 changed files with 392 additions and 271 deletions
|
@ -1,63 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* Copyright the original author or authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smack.tcp;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import org.jivesoftware.smack.Roster;
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Tests the behavior of the roster if the connection is not authenticated yet.
|
||||
*
|
||||
* @author Henning Staib
|
||||
*/
|
||||
public class RosterOfflineTest {
|
||||
|
||||
XMPPTCPConnection connection;
|
||||
|
||||
Roster roster;
|
||||
|
||||
@Before
|
||||
public void setup() throws XMPPException, SmackException {
|
||||
this.connection = new XMPPTCPConnection("user", "pass", "example.org");
|
||||
assertFalse(connection.isConnected());
|
||||
|
||||
roster = connection.getRoster();
|
||||
assertNotNull(roster);
|
||||
}
|
||||
|
||||
@Test(expected = SmackException.class)
|
||||
public void shouldThrowExceptionOnCreateEntry() throws Exception {
|
||||
roster.createEntry("test", "test", null);
|
||||
}
|
||||
|
||||
@Test(expected = SmackException.class)
|
||||
public void shouldThrowExceptionOnReload() throws Exception {
|
||||
roster.reload();
|
||||
}
|
||||
|
||||
@Test(expected = SmackException.class)
|
||||
public void shouldThrowExceptionRemoveEntry() throws Exception {
|
||||
roster.removeEntry(null);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue