Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-02-13 19:51:09 -0500
committerslewis2007-02-13 19:51:09 -0500
commit6fed2d4a38780302bf7326abef7165abeab04bf2 (patch)
tree6b78c666ea93af78d4cee12073d3cf4e8cede685 /tests/bundles/org.eclipse.ecf.tests.presence
parentbd55548e381fa6da2b80c25d57924c8b562cac04 (diff)
downloadorg.eclipse.ecf-6fed2d4a38780302bf7326abef7165abeab04bf2.tar.gz
org.eclipse.ecf-6fed2d4a38780302bf7326abef7165abeab04bf2.tar.xz
org.eclipse.ecf-6fed2d4a38780302bf7326abef7165abeab04bf2.zip
Initial checkin of new project
Diffstat (limited to 'tests/bundles/org.eclipse.ecf.tests.presence')
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.presence/.classpath7
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.presence/.cvsignore1
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.presence/.project28
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.presence/META-INF/MANIFEST.MF13
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.presence/build.properties4
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.presence/src/org/eclipse/ecf/tests/presence/Activator.java50
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.presence/src/org/eclipse/ecf/tests/presence/PresenceContainerTest.java89
7 files changed, 192 insertions, 0 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests.presence/.classpath b/tests/bundles/org.eclipse.ecf.tests.presence/.classpath
new file mode 100755
index 000000000..751c8f2e5
--- /dev/null
+++ b/tests/bundles/org.eclipse.ecf.tests.presence/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/bundles/org.eclipse.ecf.tests.presence/.cvsignore b/tests/bundles/org.eclipse.ecf.tests.presence/.cvsignore
new file mode 100755
index 000000000..ba077a403
--- /dev/null
+++ b/tests/bundles/org.eclipse.ecf.tests.presence/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/tests/bundles/org.eclipse.ecf.tests.presence/.project b/tests/bundles/org.eclipse.ecf.tests.presence/.project
new file mode 100755
index 000000000..031699ede
--- /dev/null
+++ b/tests/bundles/org.eclipse.ecf.tests.presence/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.ecf.tests.presence</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/bundles/org.eclipse.ecf.tests.presence/META-INF/MANIFEST.MF b/tests/bundles/org.eclipse.ecf.tests.presence/META-INF/MANIFEST.MF
new file mode 100755
index 000000000..2f1eb28c4
--- /dev/null
+++ b/tests/bundles/org.eclipse.ecf.tests.presence/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Presence Tests Plug-in
+Bundle-SymbolicName: org.eclipse.ecf.tests.presence
+Bundle-Version: 1.0.0.20070212
+Bundle-Activator: org.eclipse.ecf.tests.presence.Activator
+Bundle-Vendor: eclipse.org
+Require-Bundle: org.eclipse.core.runtime,
+ org.junit,
+ org.eclipse.ecf,
+ org.eclipse.ecf.presence,
+ org.eclipse.ecf.tests
+Eclipse-LazyStart: true
diff --git a/tests/bundles/org.eclipse.ecf.tests.presence/build.properties b/tests/bundles/org.eclipse.ecf.tests.presence/build.properties
new file mode 100755
index 000000000..34d2e4d2d
--- /dev/null
+++ b/tests/bundles/org.eclipse.ecf.tests.presence/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/tests/bundles/org.eclipse.ecf.tests.presence/src/org/eclipse/ecf/tests/presence/Activator.java b/tests/bundles/org.eclipse.ecf.tests.presence/src/org/eclipse/ecf/tests/presence/Activator.java
new file mode 100755
index 000000000..0d61c6ff3
--- /dev/null
+++ b/tests/bundles/org.eclipse.ecf.tests.presence/src/org/eclipse/ecf/tests/presence/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.ecf.tests.presence;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.ecf.tests.presence";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/tests/bundles/org.eclipse.ecf.tests.presence/src/org/eclipse/ecf/tests/presence/PresenceContainerTest.java b/tests/bundles/org.eclipse.ecf.tests.presence/src/org/eclipse/ecf/tests/presence/PresenceContainerTest.java
new file mode 100755
index 000000000..fdb68c7a1
--- /dev/null
+++ b/tests/bundles/org.eclipse.ecf.tests.presence/src/org/eclipse/ecf/tests/presence/PresenceContainerTest.java
@@ -0,0 +1,89 @@
+/****************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.ecf.tests.presence;
+
+import org.eclipse.ecf.core.ContainerFactory;
+import org.eclipse.ecf.core.ContainerTypeDescription;
+import org.eclipse.ecf.presence.IAccountManager;
+import org.eclipse.ecf.presence.IPresenceContainerAdapter;
+import org.eclipse.ecf.presence.chatroom.IChatRoomManager;
+import org.eclipse.ecf.presence.im.IChatManager;
+import org.eclipse.ecf.presence.roster.IRosterManager;
+import org.eclipse.ecf.tests.ContainerAbstractTestCase;
+
+/**
+ *
+ */
+public class PresenceContainerTest extends ContainerAbstractTestCase {
+
+ private static final String XMPP_CONTAINER = "ecf.xmpp.smack";
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ecf.tests.ContainerAbstractTestCase#getClientContainerName()
+ */
+ protected String getClientContainerName() {
+ return XMPP_CONTAINER;
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ clients = createClients();
+ }
+
+ protected IPresenceContainerAdapter getPresenceAdapter() {
+ return (IPresenceContainerAdapter) getClients()[0].getAdapter(IPresenceContainerAdapter.class);
+ }
+
+ public void testGetPresenceContainerAdapter() {
+ IPresenceContainerAdapter adapter = getPresenceAdapter();
+ assertNotNull(adapter);
+ }
+
+ public void testGetDescriptionsForAdapter() {
+ ContainerTypeDescription[] descs = ContainerFactory.getDefault()
+ .getDescriptionsForContainerAdapter(
+ IPresenceContainerAdapter.class);
+ assertNotNull(descs);
+ }
+
+
+ public void testGetRosterManager() {
+ IPresenceContainerAdapter adapter = getPresenceAdapter();
+ assertNotNull(adapter);
+ IRosterManager rosterManager = adapter.getRosterManager();
+ assertNotNull(rosterManager);
+ }
+
+ public void testGetAccountManager() {
+ IPresenceContainerAdapter adapter = getPresenceAdapter();
+ assertNotNull(adapter);
+ IAccountManager accountManager = adapter.getAccountManager();
+ assertNotNull(accountManager);
+ }
+
+ public void testGetChatManager() {
+ IPresenceContainerAdapter adapter = getPresenceAdapter();
+ assertNotNull(adapter);
+ IChatManager chatManager = adapter.getChatManager();
+ assertNotNull(chatManager);
+ }
+
+ public void testGetChatRoomManager() {
+ IPresenceContainerAdapter adapter = getPresenceAdapter();
+ assertNotNull(adapter);
+ IChatRoomManager chatRoomManager = adapter.getChatRoomManager();
+ assertNotNull(chatRoomManager);
+ }
+
+}

Back to the top