reSIProcate/stack  9694
Static Public Member Functions
TestTransportSelector Class Reference

List of all members.

Static Public Member Functions

static void testEmptyFail ()
static void testExactFail ()
static void testExact ()
static void testExact2 ()
static void testExactAnyPort ()
static void testAnyInterface ()
static void testAnyInterfaceAnyPort ()
static void testAnyInterfaceAnyPortV6 ()
static void testAnyInterfaceAnyPortV6Fail ()
static void testAnyInterfaceAnyPortFail ()

Detailed Description

Definition at line 14 of file testTransportSelector.cxx.


Member Function Documentation

static void TestTransportSelector::testAnyInterface ( ) [inline, static]

Definition at line 101 of file testTransportSelector.cxx.

References resip::TransportSelector::addTransport(), resip::Data::Empty, InfoLog, resip::SecurityTypes::TLSv1, resip::UDP, and resip::V4.

Referenced by main().

      { 
         InfoLog (<< "testAnyInterface" );
         
         Fifo<TransactionMessage> fif;
         TransportSelector ts(fif, 0);
         ts.addTransport(UDP,5060,V4, Data::Empty,Data::Empty, Data::Empty, SecurityTypes::TLSv1);

         Tuple tuple("127.0.0.1", 5060, true, UDP);
         Transport* trans = ts.findTransport(tuple);
         assert(trans);      
      }

Here is the call graph for this function:

static void TestTransportSelector::testAnyInterfaceAnyPort ( ) [inline, static]

Definition at line 114 of file testTransportSelector.cxx.

References resip::TransportSelector::addTransport(), resip::Data::Empty, InfoLog, resip::SecurityTypes::TLSv1, resip::UDP, and resip::V4.

Referenced by main().

      { 
         InfoLog (<< "testAnyInterfaceAnyPort" );

         Fifo<TransactionMessage> fif;
         TransportSelector ts(fif, 0);
         ts.addTransport(UDP, 5060, V4, Data::Empty,Data::Empty, Data::Empty, SecurityTypes::TLSv1);
         
         Tuple tuple("127.0.0.1", 0, true, UDP);
         Transport* trans = ts.findTransport(tuple);
         assert(trans);      
      }

Here is the call graph for this function:

static void TestTransportSelector::testAnyInterfaceAnyPortFail ( ) [inline, static]

Definition at line 154 of file testTransportSelector.cxx.

References resip::TransportSelector::addTransport(), resip::Data::Empty, InfoLog, resip::TCP, resip::SecurityTypes::TLSv1, resip::UDP, and resip::V4.

Referenced by main().

      { 
         InfoLog (<< "testAnyInterfaceAnyPortFail" );

         Fifo<TransactionMessage> fif;
         TransportSelector ts(fif, 0);
         ts.addTransport(UDP,5060,V4, Data::Empty, Data::Empty, Data::Empty, SecurityTypes::TLSv1);

         Tuple tuple("127.0.0.1", 0, true, TCP);
         Transport* trans = ts.findTransport(tuple);
         assert(!trans);
      }

Here is the call graph for this function:

static void TestTransportSelector::testAnyInterfaceAnyPortV6 ( ) [inline, static]

Definition at line 127 of file testTransportSelector.cxx.

References resip::TransportSelector::addTransport(), resip::Data::Empty, InfoLog, resip::TCP, resip::SecurityTypes::TLSv1, and resip::V6.

Referenced by main().

      { 
         InfoLog (<< "testAnyInterfaceAnyPortV6" );

         Fifo<TransactionMessage> fif;
         TransportSelector ts(fif, 0);
         ts.addTransport(TCP,  5060,   V6, Data::Empty,Data::Empty, Data::Empty, SecurityTypes::TLSv1);

         Tuple tuple("::1", 0, false, TCP);
         Transport* trans = ts.findTransport(tuple);
         assert(trans);      
      }

Here is the call graph for this function:

static void TestTransportSelector::testAnyInterfaceAnyPortV6Fail ( ) [inline, static]

Definition at line 140 of file testTransportSelector.cxx.

References resip::TransportSelector::addTransport(), resip::Data::Empty, InfoLog, resip::TCP, resip::SecurityTypes::TLSv1, and resip::V4.

Referenced by main().

      { 
         InfoLog (<< "testAnyInterfaceAnyPortV6" );

         Fifo<TransactionMessage> fif;
         TransportSelector ts(fif, 0);
         
         ts.addTransport(TCP,  5060,  V4, Data::Empty,Data::Empty, Data::Empty, SecurityTypes::TLSv1);

         Tuple tuple("::1", 0, false, TCP);
         Transport* trans = ts.findTransport(tuple);
         assert(!trans);
      }

Here is the call graph for this function:

static void TestTransportSelector::testEmptyFail ( ) [inline, static]

Definition at line 17 of file testTransportSelector.cxx.

References InfoLog.

Referenced by main().

      {
         InfoLog (<< "testEmptyFail" );

         Fifo<TransactionMessage> fif;
         TransportSelector ts(fif, 0);
      
         Tuple tuple;

         Transport* t = ts.findTransport(tuple);
         assert(t == 0);
      }
static void TestTransportSelector::testExact ( ) [inline, static]

Definition at line 43 of file testTransportSelector.cxx.

References resip::TransportSelector::addTransport(), resip::Data::Empty, InfoLog, resip::Transport::port(), resip::SecurityTypes::TLSv1, resip::UDP, and resip::V4.

Referenced by main().

      {
         InfoLog (<< "testExact" );
         
         Fifo<TransactionMessage> fif;
         TransportSelector ts(fif, 0);
         ts.addTransport(UDP, 5060, V4, "127.0.0.1", Data::Empty, Data::Empty, SecurityTypes::TLSv1);

         Tuple tuple("127.0.0.1", 5060, true, UDP);
         Transport* trans = ts.findTransport(tuple);
         assert(trans);
         assert(trans->port() == 5060);
      }

Here is the call graph for this function:

static void TestTransportSelector::testExact2 ( ) [inline, static]

Definition at line 57 of file testTransportSelector.cxx.

References resip::TransportSelector::addTransport(), resip::Data::Empty, InfoLog, resip::Transport::port(), resip::SecurityTypes::TLSv1, resip::UDP, and resip::V4.

Referenced by main().

      {
         InfoLog (<< "testExact" );
         
         Fifo<TransactionMessage> fif;
         TransportSelector ts(fif, 0);
         ts.addTransport(UDP, 5060, V4, "127.0.0.1", Data::Empty, Data::Empty, SecurityTypes::TLSv1);
         ts.addTransport(UDP, 5100, V4, "127.0.0.1", Data::Empty, Data::Empty, SecurityTypes::TLSv1);

         Tuple tuple("127.0.0.1", 5060, true, UDP);
         Transport* trans = ts.findTransport(tuple);
         assert(trans);
         assert(trans->port() == 5060);

         Tuple tuple2("127.0.0.1", 5100, true, UDP);
         trans = ts.findTransport(tuple2);
         assert(trans);
         assert(trans->port() == 5100);

         Tuple tuple3("127.0.0.2", 5100, true, UDP);
         trans = ts.findTransport(tuple3);
         assert(!trans);

         Tuple tuple4("127.0.0.2", 5200, true, UDP);
         trans = ts.findTransport(tuple4);
         assert(!trans);
      }

Here is the call graph for this function:

static void TestTransportSelector::testExactAnyPort ( ) [inline, static]

Definition at line 86 of file testTransportSelector.cxx.

References resip::TransportSelector::addTransport(), resip::Data::Empty, InfoLog, resip::Transport::port(), resip::SecurityTypes::TLSv1, resip::UDP, and resip::V4.

Referenced by main().

      {
         InfoLog (<< "testExactAnyPort" );
         
         Fifo<TransactionMessage> fif;
         TransportSelector ts(fif, 0);
         ts.addTransport(UDP, 5060, V4, "127.0.0.1", Data::Empty, Data::Empty, SecurityTypes::TLSv1);

         Tuple tuple("127.0.0.1", 0, true, UDP);
         Transport* trans = ts.findTransport(tuple);
         assert(trans);
         assert(trans->port() == 5060);
      }

Here is the call graph for this function:

static void TestTransportSelector::testExactFail ( ) [inline, static]

Definition at line 30 of file testTransportSelector.cxx.

References resip::TransportSelector::addTransport(), resip::Data::Empty, InfoLog, resip::SecurityTypes::TLSv1, resip::UDP, and resip::V4.

Referenced by main().

      {
         InfoLog (<< "testExactFail" );
         
         Fifo<TransactionMessage> fif;
         TransportSelector ts(fif, 0);
         ts.addTransport(UDP, 5061, V4, "127.0.0.1",  Data::Empty, Data::Empty, SecurityTypes::TLSv1);

         Tuple tuple("127.0.0.2", 5060, true, UDP);
         Transport* t = ts.findTransport(tuple);
         assert(!t);
      }

Here is the call graph for this function:


The documentation for this class was generated from the following file: