Example #1
0
        public void SIPTest_sip_caps_cancelled()
        {
            this.FrameworkController.ProcessCapture(this.PrepareCaptureForProcessing(SnoopersPcaps.Default.sip_caps_cancelled_pcap));

            var conversations = this.L7Conversations.ToArray();

            this.FrameworkController.ExportData(this.SnoopersToUse, conversations, this.CurrentTestBaseDirectory, false);
            var eo = this.SnooperExports.FirstOrDefault();

            //Assert.AreEqual(2, this.SnooperExports.Count);

            SnooperExportSIP exportedObjectsReference = null;

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

            var exportedObjectBases = exportedObjectsReference.ExportObjects.ToArray();

            Assert.AreEqual(1, exportedObjectBases.Length);

            var calls = exportedObjectBases.Where(i => i is SIPCall).Cast <SIPCall>().OrderBy(it => it.TimeStamp).ToArray();

            Assert.AreEqual(1, calls.Length);

            Assert.AreEqual(calls[0].TimeStamp.ToString(new CultureInfo("cs-CZ", false)), "21.02.2011 17:27:35");
            Assert.AreEqual(calls[0].From, "\"910081229\"<sip:[email protected]>");
            Assert.AreEqual(calls[0].To, "\"774693213\"<sip:[email protected]>");
            Assert.AreEqual(calls[0].RejectReason, "Unauthorized");
        }
Example #2
0
        public void SIPTest_sip_caps_direct_call__outgoing___sip()
        {
            this.FrameworkController.ProcessCapture(this.PrepareCaptureForProcessing(SnoopersPcaps.Default.sip_caps_direct_call__outgoing___sip_pcap));

            var conversations = this.L7Conversations.ToArray();

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

            //Assert.AreEqual(35, this.SnooperExports.Count);

            SnooperExportSIP exportedObjectsReference = null;

            foreach (var exportedObjects in this.SnooperExports.ToArray()) //Get SIPSnooper exported objects
            {
                if ((exportedObjects is SnooperExportSIP) && (exportedObjects.TimeStampFirst.ToString(new CultureInfo("cs-CZ", false)).Equals("22.06.2011 9:01:48")))
                {
                    exportedObjectsReference = (SnooperExportSIP)exportedObjects;
                    break;
                }
            }
            Assert.IsNotNull(exportedObjectsReference);

            var exportedObjectBases = exportedObjectsReference.ExportObjects.ToArray();

            Assert.AreEqual(1, exportedObjectBases.Length);

            var calls = exportedObjectBases.Where(i => i is SIPCall).Cast <SIPCall>().OrderBy(it => it.TimeStamp).ToArray();

            Assert.AreEqual(1, calls.Length);

            Assert.AreEqual(calls[0].TimeStamp.ToString(new CultureInfo("cs-CZ", false)), "22.06.2011 9:01:48");
            Assert.AreEqual(calls[0].From, "\"unknown\" <sip:10.10.10.215>");
            Assert.AreEqual(calls[0].To, "\"unknown\"<sip:10.10.10.109>");
            Assert.AreEqual(calls[0].RejectReason, "");
            //Assert.AreEqual(1, this.GetExportedObjectCount());
        }
Example #3
0
        public void SIPTest_sip_caps_h323sip()
        {
            this.FrameworkController.ProcessCapture(this.PrepareCaptureForProcessing(SnoopersPcaps.Default.sip_caps_h323sip_pcap));

            var conversations = this.L7Conversations.ToArray();

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


            SnooperExportSIP exportedObjectsReference = null;

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

            var exportedObjectBases = exportedObjectsReference.ExportObjects.ToArray();

            Assert.AreEqual(2, exportedObjectBases.Length);
        }