public void ToStringの確認() { //setUp var expected = "A aaa.com TTL=0 127.0.0.1"; var sut = new RrA("aaa.com", 0, new Ip("127.0.0.1")); //exercise var actual = sut.ToString(); //verify Assert.That(actual, Is.EqualTo(expected)); }
public void バイナリ初期化との比較() { //setUp var sut = new RrA("aaa.com", 64800, new Ip("1.2.3.4")); var expected = (new RrA("aaa.com", 64800, new byte[] { 1, 2, 3, 4 })).ToString(); //exercise var actual = sut.ToString(); //verify Assert.That(actual, Is.EqualTo(expected)); }
public void 実パケット生成したオブジェクトとの比較() { //setUp var sut = new RrA("aaa.com", 0x00000e10, new Ip("59.106.27.208")); var rr = new PacketRr(TestUtil.HexStream2Bytes(Str0), 0); var expected = (new RrA("aaa.com", rr.Ttl, rr.Data)).ToString(); //exercise var actual = sut.ToString(); //verify Assert.That(actual, Is.EqualTo(expected)); }