Exemple #1
0
        public void ToStringの確認()
        {
            //setUp
            var expected = "Aaaa www.com TTL=100 ::1";
            var sut      = new RrAaaa("www.com", 100, new Ip("::1"));
            //exercise
            var actual = sut.ToString();

            //verify
            Assert.That(actual, Is.EqualTo(expected));
        }
Exemple #2
0
        public void バイナリ初期化との比較()
        {
            //setUp
            var sut      = new RrAaaa("aaa.com", 64800, new Ip("::1"));
            var expected = (new RrAaaa("aaa.com", 64800, new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 })).ToString();
            //exercise
            var actual = sut.ToString();

            //verify
            Assert.That(actual, Is.EqualTo(expected));
        }
Exemple #3
0
        public void 実パケット生成したオブジェクトとの比較()
        {
            //setUp
            var sut      = new RrAaaa("orange.kame.net", 0x00015180, new Ip("2001:200:dff:fff1:216:3eff:feb1:44d7"));
            var rr       = new PacketRr(TestUtil.HexStream2Bytes(Str0), 0);
            var expected = (new RrAaaa("orange.kame.net", rr.Ttl, rr.Data)).ToString();
            //exercise
            var actual = sut.ToString();

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