aboutsummaryrefslogtreecommitdiffstats
path: root/test/net/java/sip
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2010-07-06 07:41:41 +0000
committerDamian Minkov <damencho@jitsi.org>2010-07-06 07:41:41 +0000
commit8923ff76b2eac1942c0b9cc8aa506463c694db1a (patch)
treed6eb0a839acdb24062c6f937914fb231723fc15c /test/net/java/sip
parenta5227dd7f2ac9cdb0e9512f77ef11a92791f7686 (diff)
downloadjitsi-8923ff76b2eac1942c0b9cc8aa506463c694db1a.zip
jitsi-8923ff76b2eac1942c0b9cc8aa506463c694db1a.tar.gz
jitsi-8923ff76b2eac1942c0b9cc8aa506463c694db1a.tar.bz2
- Trying to fix duplicating jabber messages.
- Remove obsolete media bundle and plugins using it that no longer work.
Diffstat (limited to 'test/net/java/sip')
-rw-r--r--test/net/java/sip/communicator/slick/media/MediaServiceLick.java76
-rw-r--r--test/net/java/sip/communicator/slick/media/TestMediaService.java137
-rw-r--r--test/net/java/sip/communicator/slick/media/media.slick.manifest.mf14
3 files changed, 0 insertions, 227 deletions
diff --git a/test/net/java/sip/communicator/slick/media/MediaServiceLick.java b/test/net/java/sip/communicator/slick/media/MediaServiceLick.java
deleted file mode 100644
index a531008..0000000
--- a/test/net/java/sip/communicator/slick/media/MediaServiceLick.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.slick.media;
-
-import java.util.*;
-
-import org.osgi.framework.*;
-import junit.framework.*;
-import net.java.sip.communicator.service.configuration.*;
-import net.java.sip.communicator.service.media.*;
-import net.java.sip.communicator.util.*;
-
-
-/**
- * This class launches the bundle which test the media bundle.
- * this bundle is a set of (j)unit tests. It should be launched by the
- * cruisecontrol module.
- *
- * @author Martin Andre
- */
-public class MediaServiceLick
- extends TestSuite
- implements BundleActivator
-{
- private Logger logger = Logger.getLogger(getClass().getName());
-
- protected static MediaService mediaService = null;
- protected static BundleContext bc = null;
- public static TestCase tcase = new TestCase(){};
-
- /**
- * Start the Media Service Implementation Compatibility Kit.
- *
- * @param bundleContext BundleContext
- * @throws Exception
- */
- public void start(BundleContext bundleContext) throws Exception
- {
- MediaServiceLick.bc = bundleContext;
- setName("MediaServiceLick");
- Hashtable<String, String> properties = new Hashtable<String, String>();
- properties.put("service.pid", getName());
-
- // disable video support when testing
- ServiceReference confReference
- = bundleContext.getServiceReference(
- ConfigurationService.class.getName());
- ConfigurationService configurationService
- = (ConfigurationService) bundleContext.getService(confReference);
- configurationService.setProperty(
- MediaService.DISABLE_VIDEO_SUPPORT_PROPERTY_NAME,
- Boolean.TRUE.toString());
-
- addTestSuite(TestMediaService.class);
- bundleContext.registerService(getClass().getName(), this, properties);
-
- logger.debug("Successfully registered " + getClass().getName());
- }
-
- /**
- * stop
- *
- * @param bundlecontext BundleContext
- * @throws Exception
- */
- public void stop(BundleContext bundlecontext) throws Exception
- {
- }
-
-
-
-}
diff --git a/test/net/java/sip/communicator/slick/media/TestMediaService.java b/test/net/java/sip/communicator/slick/media/TestMediaService.java
deleted file mode 100644
index 6d8376c..0000000
--- a/test/net/java/sip/communicator/slick/media/TestMediaService.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.slick.media;
-
-import org.osgi.framework.*;
-import junit.framework.*;
-import net.java.sip.communicator.service.media.*;
-import net.java.sip.communicator.service.media.event.*;
-
-/**
- * Tests basic MediaService behaviour.
- *
- * @author Martin Andre
- */
-public class TestMediaService extends TestCase
-{
- /**
- * The MediaService that we will be testing.
- */
- private MediaService mediaService = null;
-
- /**
- * The MediaEvent that our test listeners will capture for testing.
- * Make sure we null that upon tear down
- */
- private MediaEvent mediaEvent = null;
-
- /**
- * A Media listener impl.
- */
- private MediaListener mediaListener = new MediaListener()
- {
- public void receivedMediaStream(MediaEvent evt)
- {
- // TODO Auto-generated method stub
- mediaEvent = evt;
- }
-
- public void mediaServiceStatusChanged()
- {
- // TODO Auto-generated method stub
- }
- };
-
-
- /**
- * Generic JUnit Constructor.
- * @param name the name of the test
- */
- public TestMediaService(String name)
- {
- super(name);
- BundleContext context = MediaServiceLick.bc;
- ServiceReference ref = context.getServiceReference(
- MediaService.class.getName());
- this.mediaService = (MediaService)context.getService(ref);
- }
-
- /**
- * Generic JUnit setUp method.
- * @throws Exception if anything goes wrong.
- */
- protected void setUp() throws Exception
- {
- super.setUp();
- }
-
- /**
- * Generic JUnit tearDown method.
- * @throws Exception if anything goes wrong.
- */
- protected void tearDown() throws Exception
- {
- //first remove any remaining listeners
- mediaService.removeMediaListener(mediaListener);
-
- mediaEvent = null;
-
- super.tearDown();
- }
-
- /**
- * Test initialisation check.
- */
- public void testIsInitialized()
- {
- // Initial check
- assertFalse(mediaService.isStarted());
-
- // Initialize service
-//emcho: breaks the build on proxenet cause there's no X server there.
-// I wonder who's to blame here - proexenet for not having an X server
-// or initialize for requiring one ?
-// mediaService.initialize();
-// assertTrue(mediaService.isInitialized());
-
- // May also check that Media service is really initialized, but how?
- // This means that we don't trust service impl
-
- // Shutdown service
- assertFalse(mediaService.isStarted());
- }
-
- /**
- * Tests media event notification through listeners.
- */
- public void testMediaEventNotification()
- {
- mediaEvent = null;
-
- mediaService.addMediaListener(mediaListener);
-
- // test the initial set of a property.
-//emcho: breaks the build on proxenet cause there's no X server there.
-// I wonder who's to blame here - proexenet for not having an X server
-// or initialize for requiring one ?
-// mediaService.initialize();
-// assertNotNull("A MediaEvent with a registered listener", mediaEvent);
-
- //test remove
- mediaEvent = null;
- mediaService.removeMediaListener(mediaListener);
-
-//emcho: breaks the build on proxenet cause there's no X server there.
-// I wonder who's to blame here - proexenet for not having an X server
-// or initialize for requiring one ?
-// mediaService.initialize();
-// assertNull("A MediaEvent after unregistering a listener.",
-// mediaEvent);
-
- }
-
-}
diff --git a/test/net/java/sip/communicator/slick/media/media.slick.manifest.mf b/test/net/java/sip/communicator/slick/media/media.slick.manifest.mf
deleted file mode 100644
index 832e9f4..0000000
--- a/test/net/java/sip/communicator/slick/media/media.slick.manifest.mf
+++ /dev/null
@@ -1,14 +0,0 @@
-Bundle-Activator: net.java.sip.communicator.slick.media.MediaServiceLick
-Bundle-Name: Media Service Implementation Compatibility Kit
-Bundle-Description: A Service Implementation Compatibility Kit for the Media Service
-Bundle-Vendor: sip-communicator.org
-Bundle-Version: 0.0.1
-System-Bundle: yes
-Import-Package: org.osgi.framework,
- junit.framework,
- net.java.sip.communicator.service.configuration,
- net.java.sip.communicator.slick.media,
- net.java.sip.communicator.service.media,
- net.java.sip.communicator.service.media.event,
- net.java.sip.communicator.util,
-Export-Package: net.java.sip.communicator.slick.media