Beispiel #1
0
        public void gets_through_rpc()
        {
            string result = "0x0123";

            _jsonSerializer.Deserialize <JsonRpcSuccessResponse>(Arg.Any <string>()).Returns(new JsonRpcSuccessResponse()
            {
                Result = result
            });
            byte[] key  = new byte[1];
            byte[] elem = _rpcDb[key];
            _jsonRpcClient.Received().Post("debug_getFromDb", "Name", key.ToHexString());
            _recordDb.Received()[key] = Arg.Is <byte[]>(a => a.SequenceEqual(Bytes.FromHexString(result)));
        }