예제 #1
0
        public void RTPTest_cisco_g711alaw_pcap()
        {
            this.FrameworkController.ProcessCapture(this.PrepareCaptureForProcessing(SnoopersPcaps.Default.voip_cisco_g711alaw_pcap));

            var conversations = this.L7Conversations.ToArray();

            this.FrameworkController.ExportData(this.AvailableSnoopers, conversations, this.CurrentTestBaseDirectory, false);

            SnooperExportRTP exportedObjectsReference = null;

            foreach (var exportedObjects in this.SnooperExports.ToArray()) //Get RTPSnooper exported objects
            {
                if ((exportedObjectsReference = exportedObjects as SnooperExportRTP) != null)
                {
                    break;
                }
            }
            Assert.IsNotNull(exportedObjectsReference);

            var exportedObjectBases = exportedObjectsReference.ExportObjects.ToArray();

            Assert.AreEqual(0, exportedObjectBases.Length);

            /*
             * var objs = this.SnooperExports.OrderBy(it => it.TimeStampFirst).ToArray();
             * Assert.AreEqual(objs[0].TimeStampFirst.ToString(), "16.4.2014 15:23:43");
             * Assert.AreEqual(objs[1].TimeStampFirst.ToString(), "16.4.2014 15:23:43");
             * Assert.AreEqual(objs[2].TimeStampFirst.ToString(), "16.4.2014 15:23:43");
             * Assert.AreEqual(objs[3].TimeStampFirst.ToString(), "16.4.2014 15:23:43");
             * Assert.AreEqual(objs[4].TimeStampFirst.ToString(), "16.4.2014 15:23:45");
             * Assert.AreEqual(objs[5].TimeStampFirst.ToString(), "16.4.2014 15:23:45");
             * Assert.AreEqual(objs[6].TimeStampFirst.ToString(), "16.4.2014 15:23:47");
             * Assert.AreEqual(objs[7].TimeStampFirst.ToString(), "16.4.2014 15:23:47");*/
        }
예제 #2
0
        public void RTPTest_sip_rtcp()
        {
            this.FrameworkController.ProcessCapture(this.PrepareCaptureForProcessing(SnoopersPcaps.Default.sip_caps_sip_rtcp_pcap));

            var conversations = this.L7Conversations.ToArray();

            this.FrameworkController.ExportData(this.AvailableSnoopers, conversations, this.CurrentTestBaseDirectory, true);

            SnooperExportRTP exportedObjectsReference = null;

            foreach (var exportedObjects in this.SnooperExports.ToArray()) //Get RTPSnooper exported objects
            {
                if ((exportedObjectsReference = exportedObjects as SnooperExportRTP) != null)
                {
                    break;
                }
            }
            Assert.IsNotNull(exportedObjectsReference);

            var exportedObjectBases = exportedObjectsReference.ExportObjects.ToArray();

            Assert.AreEqual(0, exportedObjectBases.Length);

            Assert.AreEqual(76, this.SnooperExports.Count);
        }