public void TestPacketEmpty( SAPLib.Version version, SAPLib.AdressType adressType, SAPLib.Reserved reserved, SAPLib.MessageType messageType, bool encryption, bool compression, byte[] packet) { var buffer = packet; // property to flag SapPacket sap = new SapPacket() { Version = version, AdressType = adressType, Reserved = reserved, MessageType = messageType, Encryption = encryption, Compression = compression, MessageIdentifierHash = 0xFFFF, }; //Assert Assert.Equal(buffer, sap); }
public void FlagTest( SAPLib.Version version, SAPLib.AdressType adressType, SAPLib.Reserved reserved, SAPLib.MessageType messageType, bool encryption, bool compression, byte flag) { // property to flag SapPacket sap = new SapPacket() { Version = version, AdressType = adressType, Reserved = reserved, MessageType = messageType, Encryption = encryption, Compression = compression, }; //Assert Assert.Equal(flag, sap.Flag); // flag to property SapPacket sap1 = new SapPacket() { Flag = flag }; //Assert Assert.Equal(version, sap1.Version); Assert.Equal(adressType, sap1.AdressType); Assert.Equal(reserved, sap1.Reserved); Assert.Equal(messageType, sap1.MessageType); Assert.Equal(encryption, sap1.Encryption); Assert.Equal(compression, sap1.Compression); }