Ejemplo n.º 1
0
        public void getARの確認()
        {
            //setUp
            PacketDnsHeader sut      = new PacketDnsHeader(TestUtil.HexStream2Bytes(str0), 0);
            ushort          expected = 4;
            //exercise
            ushort actual = sut.GetCount(3); //AR=3

            //verify
            Assert.That(actual, Is.EqualTo(expected));
        }
Ejemplo n.º 2
0
        public void getFlagsの確認()
        {
            //setUp
            PacketDnsHeader sut      = new PacketDnsHeader(TestUtil.HexStream2Bytes(str0), 0);
            ushort          expected = 0x8180;
            //exercise
            ushort actual = sut.Flags;

            //verify
            Assert.That(actual, Is.EqualTo(expected));
        }
Ejemplo n.º 3
0
        public void setCountの確認()
        {
            //setUp
            PacketDnsHeader sut      = new PacketDnsHeader();
            var             expected = (ushort)0xf1f1;

            sut.SetCount(3, expected);
            //exercise
            ushort actual = sut.GetCount(3);

            //verify
            Assert.That(actual, Is.EqualTo(expected));
        }