utils/python-unit-tests.py
changeset 3753 a84a48233eb3
parent 3731 317f9dbccc2b
child 3768 4f07ee85f2a1
--- a/utils/python-unit-tests.py	Wed Oct 15 09:49:39 2008 +0200
+++ b/utils/python-unit-tests.py	Wed Oct 15 15:55:09 2008 +0100
@@ -118,5 +118,11 @@
 
         self.assert_(c1 is c2)
 
+    def testTypeId(self):
+        typeId1 = ns3.TypeId.LookupByNameFailSafe("ns3::UdpSocketFactory")
+        self.assertEqual(typeId1.GetName (), "ns3::UdpSocketFactory")
+        
+        self.assertRaises(KeyError, ns3.TypeId.LookupByNameFailSafe, "__InvalidTypeName__")
+
 if __name__ == '__main__':
     unittest.main()