Ejemplo n.º 1
0
        public void NBitcoinSerializeWithuint256ReturnsAsBytes()
        {
            uint256 uInt = new uint256();

            var result = DBreezeSingleThreadSession.NBitcoinSerialize(uInt);

            Assert.Equal(uInt.ToBytes(), result);
        }
Ejemplo n.º 2
0
        public void NBitcoinSerializeWithBitcoinSerializableReturnsAsBytes()
        {
            Block block = new Block();

            var result = DBreezeSingleThreadSession.NBitcoinSerialize(block);

            Assert.Equal(block.ToBytes(), result);
        }
Ejemplo n.º 3
0
        public void NBitcoinSerializeWithUnsupportedObjectThrowsException()
        {
            Assert.Throws(typeof(NotSupportedException), () =>
            {
                string test = "Should throw exception.";

                DBreezeSingleThreadSession.NBitcoinSerialize(test);
            });
        }