public void バイナリ初期化との比較() { //setUp var sut = new RrPtr("1.0.0.127.in-addr.arpa.", 64800, "1."); var expected = (new RrPtr("1.0.0.127.in-addr.arpa.", 64800, new byte[]{01, 49, 0})).ToString(); //exercise var actual = sut.ToString(); //verify Assert.That(actual, Is.EqualTo(expected)); }
public void ToStringの確認() { //setUp var expected = "Ptr 1.0.0.127.in-addr.arpa. TTL=0 www.aaa.com."; var sut = new RrPtr("1.0.0.127.in-addr.arpa.", 0, "www.aaa.com."); //exercise var actual = sut.ToString(); //verify Assert.That(actual, Is.EqualTo(expected)); }
public void 実パケット生成したオブジェクトとの比較() { //setUp var sut = new RrPtr("1.0.0.127.in-addr.arpa.", 0x00000e10, "localhost"); var rr = new PacketRr(TestUtil.HexStream2Bytes(Str0), 0); var expected = (new RrPtr("1.0.0.127.in-addr.arpa.", rr.Ttl, rr.Data)).ToString(); //exercise var actual = sut.ToString(); //verify Assert.That(actual, Is.EqualTo(expected)); }