public void ByeEncode() { // Define variables ByePacket p1 = new ByePacket(); string encodedString = p1.Encode(true); // Check result Assert.AreEqual("b", encodedString, "Bye message didn't encode correctly"); }
public void ByeDecode() { // Define variables ByePacket p1 = new ByePacket(); string encodedString = p1.Encode(true); // Try to decode packet try { ByePacket p2 = ByePacket.Decode(encodedString); } catch (System.Exception e) { Assert.Fail("Bye packet exception: " + e.Message); } }