コード例 #1
0
        /// <summary>
        /// Modifies every layer, one by one
        /// </summary>
        /// <returns>Same object with modified values</returns>
        public override INewPacket ModifyLayers()
        {
            this.IpV4Layer = _layerModifier.ModifyLayer(this.IpV4Layer);
            this.EthernetLayer = _layerModifier.ModifyLayer(this.EthernetLayer);
            this.IcmpLayer = _layerModifier.ModifyLayer(this.IcmpLayer);

            return this;
        }
コード例 #2
0
        public void ModifyLayer_LayerIsNull_ExceptionIsThrown()
        {
            // Act
            Action action = () => _target.ModifyLayer <TcpLayer>(null);

            // Assert
            action.Should().ThrowExactly <ArgumentNullException>();
        }
コード例 #3
0
        /// <summary>
        /// Modifies every layer, one by one
        /// </summary>
        /// <returns>Same object with modified values</returns>
        public override INewPacket ModifyLayers()
        {
            this.TcpLayer      = _layerModifier.ModifyLayer(this.TcpLayer);
            this.IpV4Layer     = _layerModifier.ModifyLayer(this.IpV4Layer);
            this.PayloadLayer  = _layerModifier.ModifyLayer(this.PayloadLayer);
            this.EthernetLayer = _layerModifier.ModifyLayer(this.EthernetLayer);

            return(this);
        }