public void CheckDetachAndTransmit_FileInDirectory()
        {
            var buffer = new byte[65536];

            this.dumper.Dispose ();
            this.dumper = new PCAPPacketDumper (this.clock, DIRECTORY);
            Assert.IsTrue (Directory.Exists (DIRECTORY));

            this.dumper.AttachToBackbone (this.unicast_backbone);
            using (this.dumper)
                this.CheckDetachAndTransmit_Process ();

            var filename = string.Format (@"{0}\{1}", DIRECTORY, this.unicast_backbone.Name);
            Assert.IsTrue (File.Exists (filename));

            using (var fileStream = new FileStream (filename, FileMode.Open))
            using (var binaryReader = new BinaryReader (fileStream))
                binaryReader.Read (buffer, 0, (int) binaryReader.BaseStream.Length);

            this.CheckDetachAndTransmit_Check (buffer);
        }
        public void Init()
        {
            this.clock = new ClockMock (100);
            this.dumper = new PCAPPacketDumper (this.clock);

            this.broadcast_backbone = new BroadcastBackboneMock ("1", BACKBONE_SIZE, ulong.MaxValue, this.clock);
            for (var i = 0; i < BACKBONE_SIZE; ++i)
                new InterfaceMock ().SetBackbone (this.broadcast_backbone);

            this.unicast_backbone = new UnicastBackboneMock ("2", BACKBONE_SIZE, ulong.MaxValue, this.clock);
            for (var i = 0; i < BACKBONE_SIZE; ++i)
                new InterfaceMock ().SetBackbone (this.unicast_backbone);
            this.unicast_backbone.SetPCAPType (PCAPNetworkTypes.LINKTYPE_C_HDLC);
        }