public void NewFromBytes1() { byte[] packetData = TestPacket1; var p = Ssm2ReadAddressesRequest.NewFromBytes(packetData); Assert.IsInstanceOfType(typeof(Ssm2WriteAddressResponse), p, "type"); }
public void NewFromBytes2() { byte[] packetData = TestPacket2; var p = Ssm2ReadAddressesRequest.NewFromBytes(packetData); Assert.IsInstanceOfType(typeof(Ssm2ReadAddressesRequest), p, "type"); }
public void NewFromBytes1() { byte[] packetData = TestPacket1; var p = (Ssm2InitResponse)Ssm2ReadAddressesRequest.NewFromBytes(packetData); Assert.IsInstanceOfType(typeof(Ssm2InitResponse), p, "type"); Assert.IsInstanceOfType(typeof(Ssm2Packet), p, "base type"); AssertKnownProperties1(p); AssertContent(p, SSMID1, ROMID1, Capabilities1); }
public void NewFromBytes1() { byte[] packetData = TestPacket1; // Static method NewFromBytes () analyzes packet type, // and returns a specific packet object. // Based on given data in this case we know upfront, // it'll be an read-addresses-request. var p = Ssm2ReadAddressesRequest.NewFromBytes(packetData); Assert.IsInstanceOfType(typeof(Ssm2ReadAddressesRequest), p, "type"); }