public void ProtocolErrorMessageSignedDao_ProtocolErrorMessageSigned_Should_Be_Convertible() { var byteRn = new byte[30]; new Random().NextBytes(byteRn); var original = new ProtocolErrorMessage { CorrelationId = Guid.NewGuid().ToByteString(), Signature = new Signature { RawBytes = byteRn.ToByteString(), SigningContext = DevNetPeerSigningContext.Instance }, PeerId = PeerIdHelper.GetPeerId("test"), Code = 74 }; var errorMessageSignedDao = original.ToDao <ProtocolErrorMessage, ProtocolErrorMessageDao>(_mapperProvider); var reconverted = errorMessageSignedDao.ToProtoBuff <ProtocolErrorMessageDao, ProtocolErrorMessage>(_mapperProvider); reconverted.Should().Be(original); }
private void OnError(ProtocolErrorMessage err) { Console.WriteLine("PROTOCOL ERROR: " + err.error + " ( " + err.errorDescription + ")"); }