public void TestString() { _sendBridgeStream.Write("şerhat"); var data = _sendBridgeStream.Encode(); var receivePacket = new BridgeStream(data); var sendValue = receivePacket.ReadString(); Assert.AreEqual("şerhat", sendValue); }
public void TestHasMore() { _sendBridgeStream.Write("Ferhat"); _sendBridgeStream.Write("Ferhat"); _sendBridgeStream.Write("Ferhat"); _sendBridgeStream.Write("Ferhat"); _sendBridgeStream.Write("Ferhat"); var data = _sendBridgeStream.Encode(); var receivePacket = new BridgeStream(data); var readCount = 0; while (receivePacket.HasMore) { receivePacket.ReadString(); readCount++; } Assert.AreEqual(5, readCount); }