[asterisk-scf-commits] asterisk-scf/integration/media_rtp_pjmedia.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Mon Aug 16 14:37:00 CDT 2010
branch "master" has been updated
via 74626ffec894fe58322e576ce6b1e49cd5432ecb (commit)
from 0031e4fa8e1b0b5bffae2d9511287e3c8097894a (commit)
Summary of changes:
test/TestRTPpjmedia.cpp | 66 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 66 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 74626ffec894fe58322e576ce6b1e49cd5432ecb
Author: Joshua Colp <jcolp at digium.com>
Date: Mon Aug 16 16:49:26 2010 -0300
Add tests for RTP session allocation and release.
diff --git a/test/TestRTPpjmedia.cpp b/test/TestRTPpjmedia.cpp
index 82527ad..964a915 100644
--- a/test/TestRTPpjmedia.cpp
+++ b/test/TestRTPpjmedia.cpp
@@ -41,6 +41,11 @@ public:
* A proxy to the service locator service.
*/
ServiceLocatorPrx locator;
+
+ /**
+ * A proxy to the RTP session that we requested.
+ */
+ RTPSessionPrx session;
};
static SharedTestData Testbed;
@@ -130,3 +135,64 @@ BOOST_AUTO_TEST_CASE(ServiceFoundUsingName)
BOOST_CHECK(found);
}
+
+/**
+ * Attempt to allocate an RTP session using a fake format
+ */
+BOOST_AUTO_TEST_CASE(AllocateRTPSession)
+{
+ bool allocated = false;
+
+ try
+ {
+ ServiceLocatorParamsPtr params = new ServiceLocatorParams();
+ params->category = "rtp";
+
+ RTPMediaServicePrx service = RTPMediaServicePrx::uncheckedCast(Testbed.locator->locate(params));
+
+ FormatPtr format = new Format();
+ format->name = "test_format";
+
+ FormatSeq formats;
+ formats.push_back(format);
+
+ Testbed.session = service->allocate(formats);
+
+ allocated = true;
+ }
+ catch (const Ice::Exception &e)
+ {
+ BOOST_TEST_MESSAGE(e.ice_name());
+ BOOST_TEST_MESSAGE(e.what());
+ }
+ catch (...)
+ {
+ }
+
+ BOOST_CHECK(allocated);
+}
+
+/**
+ * Attempt to release our RTP session
+ */
+BOOST_AUTO_TEST_CASE(ReleaseRTPSession)
+{
+ bool released = false;
+
+ try
+ {
+ Testbed.session->release();
+
+ released = true;
+ }
+ catch (const Ice::Exception &e)
+ {
+ BOOST_TEST_MESSAGE(e.ice_name());
+ BOOST_TEST_MESSAGE(e.what());
+ }
+ catch (...)
+ {
+ }
+
+ BOOST_CHECK(released);
+}
-----------------------------------------------------------------------
--
asterisk-scf/integration/media_rtp_pjmedia.git
More information about the asterisk-scf-commits
mailing list