Example #1
0
        public static void PacketBlockFlags_FCSLength_Test()
        {
            PacketBlockFlags packetFlagFCSLength = new PacketBlockFlags(480);

            Assert.IsTrue(packetFlagFCSLength.FCSLength);

            PacketBlockFlags packetFlagNoFCSLength = new PacketBlockFlags(128);

            Assert.IsFalse(packetFlagNoFCSLength.FCSLength);
        }
Example #2
0
        public static void PacketBlockFlags_CrcError_Test()
        {
            PacketBlockFlags packetCrcError = new PacketBlockFlags(0xFF000000);

            Assert.IsTrue(packetCrcError.CrcError);

            PacketBlockFlags packetFlagNoError = new PacketBlockFlags(128);

            Assert.IsFalse(packetFlagNoError.CrcError);
        }
Example #3
0
        public static void PacketBlockFlags_Broadcast_Test()
        {
            PacketBlockFlags packetFlagBroadcast = new PacketBlockFlags(255);

            Assert.IsTrue(packetFlagBroadcast.Broadcast);

            PacketBlockFlags packetFlagNoBroadcast = new PacketBlockFlags(128);

            Assert.IsFalse(packetFlagNoBroadcast.Broadcast);
        }
Example #4
0
        public static void PacketBlockFlags_Promisious_Test()
        {
            PacketBlockFlags packetFlagPromisious = new PacketBlockFlags(255);

            Assert.IsTrue(packetFlagPromisious.Promiscuous);

            PacketBlockFlags packetFlagNoPromisious = new PacketBlockFlags(128);

            Assert.IsFalse(packetFlagNoPromisious.Promiscuous);
        }
Example #5
0
        public static void PacketBlockFlags_Outbound_Test()
        {
            PacketBlockFlags packetFlagOutbound = new PacketBlockFlags(254);

            Assert.IsTrue(packetFlagOutbound.Outbound);

            PacketBlockFlags packetFlagNoOutbound = new PacketBlockFlags(253);

            Assert.IsFalse(packetFlagNoOutbound.Outbound);
        }
Example #6
0
        public static void PacketBlockFlags_Multicast_Test()
        {
            PacketBlockFlags packetFlagMulticast = new PacketBlockFlags(255);

            Assert.IsTrue(packetFlagMulticast.Multicast);

            PacketBlockFlags packetFlagNoMulticast = new PacketBlockFlags(128);

            Assert.IsFalse(packetFlagNoMulticast.Multicast);
        }
Example #7
0
        public static void PacketBlockFlags_tartFrameDelimiterError_Test()
        {
            PacketBlockFlags packetStartFrameDelimiterError = new PacketBlockFlags(0xFF000000);

            Assert.IsTrue(packetStartFrameDelimiterError.StartFrameDelimiterError);

            PacketBlockFlags packetFlagNoError = new PacketBlockFlags(128);

            Assert.IsFalse(packetFlagNoError.StartFrameDelimiterError);
        }
Example #8
0
        public static void PacketBlockFlags_UnalignedFrameError_Test()
        {
            PacketBlockFlags packetUnalignedFrameError = new PacketBlockFlags(0xFF000000);

            Assert.IsTrue(packetUnalignedFrameError.UnalignedFrameError);

            PacketBlockFlags packetFlagNoError = new PacketBlockFlags(128);

            Assert.IsFalse(packetFlagNoError.UnalignedFrameError);
        }
Example #9
0
        public static void PacketBlockFlags_WrongInterFrameGapError_Test()
        {
            PacketBlockFlags packetWrongInterFrameGapError = new PacketBlockFlags(0xFF000000);

            Assert.IsTrue(packetWrongInterFrameGapError.WrongInterFrameGapError);

            PacketBlockFlags packetFlagNoError = new PacketBlockFlags(128);

            Assert.IsFalse(packetFlagNoError.WrongInterFrameGapError);
        }
Example #10
0
        public static void PacketBlockFlags_Inbound_Test()
        {
            PacketBlockFlags packetFlagInbound = new PacketBlockFlags(511);

            Assert.IsTrue(packetFlagInbound.Inbound);

            PacketBlockFlags packetFlagNoInbound = new PacketBlockFlags(512);

            Assert.IsFalse(packetFlagNoInbound.Inbound);
        }
Example #11
0
        public override bool Equals(Object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            PacketBlockFlags p = (PacketBlockFlags)obj;

            return(this.Flag == p.Flag);
        }