public void SetBytesで値を設定してgetBytesで取得する() { //setUp var sut = new MyPacket(); var expected = new byte[Max - 20]; for (var i = 0; i < Max - 20; i++){ expected[i] = (byte) i; } sut.SetBytes(expected, 20); //exercise var actual = sut.GetBytes(20, Max - 20); //verify Assert.That(actual, Is.EqualTo(expected)); }
public void SetBytesで値を設定してgetBytesで取得する() { //setUp var sut = new MyPacket(); var expected = new byte[Max - 20]; for (var i = 0; i < Max - 20; i++) { expected[i] = (byte)i; } sut.SetBytes(expected, 20); //exercise var actual = sut.GetBytes(20, Max - 20); //verify Assert.That(actual, Is.EqualTo(expected)); }